@@ -53,6 +53,8 @@ export interface TestResult_TestError {
53
53
error_message : string ;
54
54
/** A list of StackFrame messages that indicate a single trace of code. */
55
55
stack_frames : TestResult_TestError_StackFrame [ ] ;
56
+ /** The raw stack trace associated with the error. */
57
+ stack_trace : string ;
56
58
}
57
59
58
60
/** An individual stack frame that represents a line of code within a file. */
@@ -114,12 +116,16 @@ export interface GenericResultV1_GenericError {
114
116
* lookup".
115
117
*/
116
118
error_message : string ;
117
- /** The name of the function where the error occurred */
119
+ /** The name of the function where the error occurred. */
118
120
function_name : string ;
119
121
/** The name of the file that reported the error. */
120
122
file_path : string ;
121
123
/** Line number that reported the error. */
122
- line ?: number | undefined ;
124
+ line ?:
125
+ | number
126
+ | undefined ;
127
+ /** The raw stack trace that is associated with this error. */
128
+ stack_trace : string ;
123
129
}
124
130
125
131
export interface SyntheticResult {
@@ -282,7 +288,7 @@ export const TestResult = {
282
288
} ;
283
289
284
290
function createBaseTestResult_TestError ( ) : TestResult_TestError {
285
- return { error_type : "" , error_message : "" , stack_frames : [ ] } ;
291
+ return { error_type : "" , error_message : "" , stack_frames : [ ] , stack_trace : "" } ;
286
292
}
287
293
288
294
export const TestResult_TestError = {
@@ -296,6 +302,9 @@ export const TestResult_TestError = {
296
302
for ( const v of message . stack_frames ) {
297
303
TestResult_TestError_StackFrame . encode ( v ! , writer . uint32 ( 26 ) . fork ( ) ) . ldelim ( ) ;
298
304
}
305
+ if ( message . stack_trace !== "" ) {
306
+ writer . uint32 ( 34 ) . string ( message . stack_trace ) ;
307
+ }
299
308
return writer ;
300
309
} ,
301
310
@@ -327,6 +336,13 @@ export const TestResult_TestError = {
327
336
328
337
message . stack_frames . push ( TestResult_TestError_StackFrame . decode ( reader , reader . uint32 ( ) ) ) ;
329
338
continue ;
339
+ case 4 :
340
+ if ( tag !== 34 ) {
341
+ break ;
342
+ }
343
+
344
+ message . stack_trace = reader . string ( ) ;
345
+ continue ;
330
346
}
331
347
if ( ( tag & 7 ) === 4 || tag === 0 ) {
332
348
break ;
@@ -343,6 +359,7 @@ export const TestResult_TestError = {
343
359
stack_frames : Array . isArray ( object ?. stack_frames )
344
360
? object . stack_frames . map ( ( e : any ) => TestResult_TestError_StackFrame . fromJSON ( e ) )
345
361
: [ ] ,
362
+ stack_trace : isSet ( object . stack_trace ) ? String ( object . stack_trace ) : "" ,
346
363
} ;
347
364
} ,
348
365
@@ -355,6 +372,7 @@ export const TestResult_TestError = {
355
372
} else {
356
373
obj . stack_frames = [ ] ;
357
374
}
375
+ message . stack_trace !== undefined && ( obj . stack_trace = message . stack_trace ) ;
358
376
return obj ;
359
377
} ,
360
378
@@ -367,6 +385,7 @@ export const TestResult_TestError = {
367
385
message . error_type = object . error_type ?? "" ;
368
386
message . error_message = object . error_message ?? "" ;
369
387
message . stack_frames = object . stack_frames ?. map ( ( e ) => TestResult_TestError_StackFrame . fromPartial ( e ) ) || [ ] ;
388
+ message . stack_trace = object . stack_trace ?? "" ;
370
389
return message ;
371
390
} ,
372
391
} ;
@@ -684,7 +703,7 @@ export const GenericResultV1 = {
684
703
} ;
685
704
686
705
function createBaseGenericResultV1_GenericError ( ) : GenericResultV1_GenericError {
687
- return { error_type : "" , error_message : "" , function_name : "" , file_path : "" , line : undefined } ;
706
+ return { error_type : "" , error_message : "" , function_name : "" , file_path : "" , line : undefined , stack_trace : "" } ;
688
707
}
689
708
690
709
export const GenericResultV1_GenericError = {
@@ -704,6 +723,9 @@ export const GenericResultV1_GenericError = {
704
723
if ( message . line !== undefined ) {
705
724
writer . uint32 ( 40 ) . int64 ( message . line ) ;
706
725
}
726
+ if ( message . stack_trace !== "" ) {
727
+ writer . uint32 ( 50 ) . string ( message . stack_trace ) ;
728
+ }
707
729
return writer ;
708
730
} ,
709
731
@@ -749,6 +771,13 @@ export const GenericResultV1_GenericError = {
749
771
750
772
message . line = longToNumber ( reader . int64 ( ) as Long ) ;
751
773
continue ;
774
+ case 6 :
775
+ if ( tag !== 50 ) {
776
+ break ;
777
+ }
778
+
779
+ message . stack_trace = reader . string ( ) ;
780
+ continue ;
752
781
}
753
782
if ( ( tag & 7 ) === 4 || tag === 0 ) {
754
783
break ;
@@ -765,6 +794,7 @@ export const GenericResultV1_GenericError = {
765
794
function_name : isSet ( object . function_name ) ? String ( object . function_name ) : "" ,
766
795
file_path : isSet ( object . file_path ) ? String ( object . file_path ) : "" ,
767
796
line : isSet ( object . line ) ? Number ( object . line ) : undefined ,
797
+ stack_trace : isSet ( object . stack_trace ) ? String ( object . stack_trace ) : "" ,
768
798
} ;
769
799
} ,
770
800
@@ -775,6 +805,7 @@ export const GenericResultV1_GenericError = {
775
805
message . function_name !== undefined && ( obj . function_name = message . function_name ) ;
776
806
message . file_path !== undefined && ( obj . file_path = message . file_path ) ;
777
807
message . line !== undefined && ( obj . line = Math . round ( message . line ) ) ;
808
+ message . stack_trace !== undefined && ( obj . stack_trace = message . stack_trace ) ;
778
809
return obj ;
779
810
} ,
780
811
@@ -789,6 +820,7 @@ export const GenericResultV1_GenericError = {
789
820
message . function_name = object . function_name ?? "" ;
790
821
message . file_path = object . file_path ?? "" ;
791
822
message . line = object . line ?? undefined ;
823
+ message . stack_trace = object . stack_trace ?? "" ;
792
824
return message ;
793
825
} ,
794
826
} ;
@@ -1066,4 +1098,4 @@ function isObject(value: any): boolean {
1066
1098
1067
1099
function isSet ( value : any ) : boolean {
1068
1100
return value !== null && value !== undefined ;
1069
- }
1101
+ }
0 commit comments