Quellcode durchsuchen

Wrap thrown string in std::runtime_error

Winston Weinert vor 6 Jahren
Ursprung
Commit
d9f3587a71
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/main.cpp

+ 1
- 1
src/main.cpp Datei anzeigen

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;