Rethrow with "catch(...) throw;"
authorClifford Wolf <clifford@clifford.at>
Sun, 25 Jan 2015 21:57:09 +0000 (22:57 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 25 Jan 2015 21:57:09 +0000 (22:57 +0100)
kernel/yosys.cc
passes/cmds/tee.cc
passes/cmds/trace.cc

index d5467afe1b423e67cb8f3620b3a7b8cc23b7cb98..b280d3344e59bb05d7fd0dada6021c689947ca9a 100644 (file)
@@ -720,9 +720,9 @@ void run_frontend(std::string filename, std::string command, RTLIL::Design *desi
                                        Pass::call(design, command);
                        }
                }
-               catch (log_cmd_error_exception) {
+               catch (...) {
                        Frontend::current_script_file = backup_script_file;
-                       throw log_cmd_error_exception();
+                       throw;
                }
 
                Frontend::current_script_file = backup_script_file;
index e83c938716bd0666fcbbc2adfefc707b04fb8abb..a0484090fe80fae763f2b999921df162f070a306 100644 (file)
@@ -76,11 +76,11 @@ struct TeePass : public Pass {
                try {
                        std::vector<std::string> new_args(args.begin() + argidx, args.end());
                        Pass::call(design, new_args);
-               } catch (log_cmd_error_exception) {
+               } catch (...) {
                        for (auto cf : files_to_close)
                                fclose(cf);
                        log_files = backup_log_files;
-                       throw log_cmd_error_exception();
+                       throw;
                }
 
                for (auto cf : files_to_close)
index e05fedb3540a9bb47592324444961228f5304ee0..1a5f873ff9af10e32a95b64b49b46001e7ea5c9c 100644 (file)
@@ -85,9 +85,9 @@ struct TracePass : public Pass {
                try {
                        std::vector<std::string> new_args(args.begin() + argidx, args.end());
                        Pass::call(design, new_args);
-               } catch (log_cmd_error_exception) {
+               } catch (...) {
                        design->monitors.erase(&monitor);
-                       throw log_cmd_error_exception();
+                       throw;
                }
 
                design->monitors.erase(&monitor);