Pass::call(design, command);
}
}
- catch (...) {
+ catch (log_cmd_error_expection) {
Frontend::current_script_file = backup_script_file;
- std::rethrow_exception(std::current_exception());
+ throw log_cmd_error_expection();
}
Frontend::current_script_file = backup_script_file;
try {
assert(design->selection_stack.size() == 1);
Pass::call(design, command);
- } catch (int) {
+ } catch (log_cmd_error_expection) {
while (design->selection_stack.size() > 1)
design->selection_stack.pop_back();
log_reset_stack();
#define S__LINE__sub1(x) S__LINE__sub2(x)
#define S__LINE__ S__LINE__sub1(__LINE__)
+struct log_cmd_error_expection { };
+
extern std::vector<FILE*> log_files;
extern FILE *log_errfile;
extern bool log_time;
* Convert a signal into a KISS-compatible textual representation.
*/
std::string kiss_convert_signal(const RTLIL::SigSpec &sig) {
- if (!sig.is_fully_const()) {
- throw 0;
- }
-
+ log_assert(sig.is_fully_const());
return sig.as_const().as_string();
}