mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Add script-layer call stack to internal errors messages that abort
This commit is contained in:
parent
a7ba44089b
commit
b2560384c4
7 changed files with 66 additions and 12 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "Obj.h"
|
||||
#include "Serializer.h"
|
||||
#include "Func.h"
|
||||
#include "File.h"
|
||||
#include "plugin/Manager.h"
|
||||
|
||||
|
@ -139,7 +140,13 @@ void BroObj::Internal(const char* msg) const
|
|||
{
|
||||
ODesc d;
|
||||
DoMsg(&d, msg);
|
||||
reporter->InternalError("%s", d.Description());
|
||||
auto rcs = render_call_stack();
|
||||
|
||||
if ( rcs.empty() )
|
||||
reporter->InternalError("%s", d.Description());
|
||||
else
|
||||
reporter->InternalError("%s, call stack: %s", d.Description(), rcs.data());
|
||||
|
||||
reporter->PopLocation();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue