Browse Source

Wrap thrown string in std::runtime_error

Winston Weinert 6 years ago
parent
commit
d9f3587a71
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/main.cpp

+ 1
- 1
src/main.cpp View File

43
             value = value.substr(sz+1);
43
             value = value.substr(sz+1);
44
             found[3] = std::stof(value,&sz);
44
             found[3] = std::stof(value,&sz);
45
             if ( value.size() != sz ) {
45
             if ( value.size() != sz ) {
46
-                throw "dur";
46
+                throw std::runtime_error("dur");
47
             }
47
             }
48
         } else {
48
         } else {
49
             found[3] = 1;
49
             found[3] = 1;