From 767bcc9a96f0f49ce1089481ae32a8797f6087e2 Mon Sep 17 00:00:00 2001 From: andronache98 Date: Mon, 20 Dec 2021 16:27:40 +0200 Subject: [PATCH] Modified api for panic --- apier/v1/core.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apier/v1/core.go b/apier/v1/core.go index 259eb83bb..15bdc668d 100644 --- a/apier/v1/core.go +++ b/apier/v1/core.go @@ -96,6 +96,12 @@ func (cS *CoreSv1) StopMemoryProfiling(_ *utils.TenantWithAPIOpts, reply *string return nil } -func (cS *CoreSv1) Panic(args *string, _ *string) error { - panic(*args) +type PanicMsgWithTenantAPIOpts struct { + Tenant string + APIOpts map[string]interface{} + Msg string +} + +func (cS *CoreSv1) Panic(args *PanicMsgWithTenantAPIOpts, _ *string) error { + panic(utils.ToJSON(args)) }