mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
new function for getting the location, if any, associated with the current call
This commit is contained in:
parent
8fb30f1d62
commit
8f2637decb
6 changed files with 14 additions and 8 deletions
|
@ -22,7 +22,7 @@ module Reporter;
|
|||
## .. zeek:see:: reporter_info
|
||||
function Reporter::info%(msg: string%): bool
|
||||
%{
|
||||
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||
reporter->PushLocation(frame->GetCallLocation());
|
||||
reporter->Info("%s", msg->CheckString());
|
||||
reporter->PopLocation();
|
||||
return zeek::val_mgr->True();
|
||||
|
@ -37,7 +37,7 @@ function Reporter::info%(msg: string%): bool
|
|||
## .. zeek:see:: reporter_warning
|
||||
function Reporter::warning%(msg: string%): bool
|
||||
%{
|
||||
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||
reporter->PushLocation(frame->GetCallLocation());
|
||||
reporter->Warning("%s", msg->CheckString());
|
||||
reporter->PopLocation();
|
||||
return zeek::val_mgr->True();
|
||||
|
@ -53,7 +53,7 @@ function Reporter::warning%(msg: string%): bool
|
|||
## .. zeek:see:: reporter_error
|
||||
function Reporter::error%(msg: string%): bool
|
||||
%{
|
||||
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||
reporter->PushLocation(frame->GetCallLocation());
|
||||
reporter->Error("%s", msg->CheckString());
|
||||
reporter->PopLocation();
|
||||
return zeek::val_mgr->True();
|
||||
|
@ -66,7 +66,7 @@ function Reporter::error%(msg: string%): bool
|
|||
## Returns: Always true.
|
||||
function Reporter::fatal%(msg: string%): bool
|
||||
%{
|
||||
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||
reporter->PushLocation(frame->GetCallLocation());
|
||||
reporter->FatalError("%s", msg->CheckString());
|
||||
reporter->PopLocation();
|
||||
return zeek::val_mgr->True();
|
||||
|
@ -80,7 +80,7 @@ function Reporter::fatal%(msg: string%): bool
|
|||
## Returns: Always true.
|
||||
function Reporter::fatal_error_with_core%(msg: string%): bool
|
||||
%{
|
||||
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||
reporter->PushLocation(frame->GetCallLocation());
|
||||
reporter->FatalErrorWithCore("%s", msg->CheckString());
|
||||
reporter->PopLocation();
|
||||
return zeek::val_mgr->True();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue