File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,21 @@ func SetAsStream(ctx context.Context) bool {
6363}
6464
6565func 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 {
You can’t perform that action at this time.
0 commit comments