@@ -19,7 +19,11 @@ func String(s string) *string {
1919 return & s
2020}
2121
22- func (s * server ) ParseConfig (ctx context.Context , in * ParseConfigRequest ) (* ParseConfigResponse , error ) {
22+ func (s * server ) ParseConfig (ctx context.Context , in * ParseConfigRequest ) (resp * ParseConfigResponse , err error ) {
23+ defer DeferPanicToError ("ParseConfig" , func (recovered_err error ) {
24+ resp = & ParseConfigResponse {Error : String (fmt .Sprintf ("%v" , recovered_err ))}
25+ err = nil
26+ })
2327 ctx = libbox .BaseContext (nil )
2428 config , err := ParseConfig (ctx , & ReadOptions {Path : in .Path }, in .Debug , nil , false )
2529 if err != nil {
@@ -36,7 +40,11 @@ func (s *server) ParseConfig(ctx context.Context, in *ParseConfigRequest) (*Pars
3640 return & ParseConfigResponse {Error : String ("" )}, nil
3741}
3842
39- func (s * server ) GenerateFullConfig (ctx context.Context , in * GenerateConfigRequest ) (* GenerateConfigResponse , error ) {
43+ func (s * server ) GenerateFullConfig (ctx context.Context , in * GenerateConfigRequest ) (resp * GenerateConfigResponse , err error ) {
44+ defer DeferPanicToError ("GenerateFullConfig" , func (recovered_err error ) {
45+ resp = & GenerateConfigResponse {Error : String (fmt .Sprintf ("%v" , recovered_err ))}
46+ err = nil
47+ })
4048 ctx = libbox .BaseContext (nil )
4149 config , err := BuildConfigJson (ctx , DefaultHiddifyOptions (), & ReadOptions {Path : in .Path })
4250 if err != nil {
0 commit comments