mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
d8afb8d7cf
commit
f4e3bc2308
@ -15,6 +15,11 @@ using namespace pkpy;
|
||||
vm->c_data->push(py_var(vm, e)); \
|
||||
vm->c_data->push(NULL); \
|
||||
return false; \
|
||||
} catch(const std::exception& re){ \
|
||||
auto e = Exception("std::exception", re.what()); \
|
||||
vm->c_data->push(py_var(vm, e)); \
|
||||
vm->c_data->push(NULL); \
|
||||
return false; \
|
||||
}
|
||||
|
||||
|
||||
|
6
src/vm.h
6
src/vm.h
@ -220,9 +220,9 @@ public:
|
||||
}
|
||||
#if !DEBUG_FULL_EXCEPTION
|
||||
catch (const std::exception& e) {
|
||||
_stderr(this, "An std::exception occurred! It could be a bug.\n");
|
||||
_stderr(this, e.what());
|
||||
_stderr(this, "\n");
|
||||
Str msg = "An std::exception occurred! It could be a bug.\n";
|
||||
msg = msg + e.what();
|
||||
_stderr(this, msg + "\n");
|
||||
}
|
||||
#endif
|
||||
callstack.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user