diff options
author | Erik Benoist <erik@reverb.com> | 2018-06-26 22:24:24 -0500 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2018-06-26 20:24:24 -0700 |
commit | 74f8e24232e0d67ab79419130b5bf3a5a875593d (patch) | |
tree | fb07e3941d100639c205b8afdd9b0660703ff534 /ruby/ext/google/protobuf_c/protobuf.h | |
parent | ed00fbbad100fccb042ec671b50d89145d1885c9 (diff) |
Adds a base class for all explicitly raised TypeErrors (#4255)
* This allows for ruby code to catch and handle Protobuf
TypeErrors separately from the standard Ruby TypeError
* Maintains backwards compatibility by having the new
Google::Protobuf::TypeError inherit from the base
TypeError. Any code that was catching TypeError should
continue to work.
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 5266aa8d..3e5c0520 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -161,6 +161,7 @@ extern VALUE cBuilder; extern VALUE cError; extern VALUE cParseError; +extern VALUE cTypeError; // We forward-declare all of the Ruby method implementations here because we // sometimes call the methods directly across .c files, rather than going |