Skip to content

Instantly share code, notes, and snippets.

@lmolkova
Last active October 29, 2018 22:02
Show Gist options
  • Save lmolkova/f1b2ce6a0d9ebf926dd3556a468d9ce6 to your computer and use it in GitHub Desktop.
Save lmolkova/f1b2ce6a0d9ebf926dd3556a468d9ce6 to your computer and use it in GitHub Desktop.
Exceptions

Java Exception

Throwable property name Proto property Language-specific description
message message message that describes the current exception
cause inner_errors linked list of instances that caused the current exception
stackTrace stack_frames immediate frames on the call stack
suppressed ??? TODO exceptions that were suppressed in order to deliver this exception
throwable.getClass() error_info.error_type type of Throwable

C# Exception

Exception property name Proto property Language-specific description
Data attributes collection of additional user-defined key/value pairs
HelpLink attributes link to the help file associated with this exception
HResult attributes a coded numerical value that is assigned to a specific exception
InnerException inner_errors linked list of instances that caused the current exception
Message message message that describes the current exception
Source StackFrames.frame[0].load_module application or the object that causes the error
StackTrace StackFrames (parsed from string) string representation of the immediate frames on the call stack
TargetSite StackFrames.frame[0] method that throws the current exception
typeof(Exception) error_info.error_type type of Exception

Python exception

Property name Proto property Language-specific description
exception.message, sys.exc_info() message message that describes the current exception
traceback.format_exc(). stack_frames (parsed from string []) formatted stack trace
type(exception), sys.exc_info() error_info.error_type type of exception

Go error

Property name Proto property Language-specific description
message message message that describes the current exception
runtime.Stack() stack_frames (parsed from byte[]) formatted stack trace of the goroutine
err.(type) error_info.error_type type of Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment