|
@@ -164,21 +164,20 @@ namespace pkpy{
|
|
|
#endif
|
|
#endif
|
|
|
return _exec(code, _module);
|
|
return _exec(code, _module);
|
|
|
}catch (const Exception& e){
|
|
}catch (const Exception& e){
|
|
|
- Str sum = e.summary() + "\n";
|
|
|
|
|
- _stderr(sum.data, sum.size);
|
|
|
|
|
|
|
+ stderr_write(e.summary() + "\n");
|
|
|
}
|
|
}
|
|
|
#if !PK_DEBUG_FULL_EXCEPTION
|
|
#if !PK_DEBUG_FULL_EXCEPTION
|
|
|
catch(const std::exception& e) {
|
|
catch(const std::exception& e) {
|
|
|
Str msg = "An std::exception occurred! It could be a bug.\n";
|
|
Str msg = "An std::exception occurred! It could be a bug.\n";
|
|
|
msg = msg + e.what() + "\n";
|
|
msg = msg + e.what() + "\n";
|
|
|
- _stderr(msg.data, msg.size);
|
|
|
|
|
|
|
+ stderr_write(msg);
|
|
|
}
|
|
}
|
|
|
catch(NeedMoreLines){
|
|
catch(NeedMoreLines){
|
|
|
throw;
|
|
throw;
|
|
|
}
|
|
}
|
|
|
catch(...) {
|
|
catch(...) {
|
|
|
Str msg = "An unknown exception occurred! It could be a bug. Please report it to @blueloveTH on GitHub.\n";
|
|
Str msg = "An unknown exception occurred! It could be a bug. Please report it to @blueloveTH on GitHub.\n";
|
|
|
- _stderr(msg.data, msg.size);
|
|
|
|
|
|
|
+ stderr_write(msg);
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
callstack.clear();
|
|
callstack.clear();
|