Skip to content

Commit cbff14b

Browse files
committed
misc
1 parent 677068f commit cbff14b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scouterx/strace/tracemain.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ func SetAsStream(ctx context.Context) bool {
6363
}
6464

6565
func MarkAsError(ctx context.Context, errorMessage string) {
66+
common.ReportScouterPanic()
67+
if ctx == nil {
68+
return
69+
}
70+
tctx := tctxmanager.GetTraceContext(ctx)
71+
if tctx == nil {
72+
return
73+
}
74+
if tctx.Error == 0 {
75+
tctx.Error = netio.SendError(errorMessage)
76+
}
77+
AddPMessageStep(ctx, netdata.PMSG_ERROR, errorMessage, 0)
78+
}
79+
80+
func MarkAsErrorForcibly(ctx context.Context, errorMessage string) {
6681
common.ReportScouterPanic()
6782
if ctx == nil {
6883
return
@@ -330,7 +345,7 @@ func StartMethod(ctx context.Context) *netdata.MethodStep {
330345
return StartMethodWithParam(ctx, nil)
331346
}
332347

333-
func StartMethodWithParam(ctx context.Context, params []interface{}) *netdata.MethodStep {
348+
func StartMethodWithParam(ctx context.Context, params ...interface{}) *netdata.MethodStep {
334349
defer common.ReportScouterPanic()
335350

336351
if ctx == nil {

0 commit comments

Comments
 (0)