This PR refactors our implementation of caused by exceptions to match other platforms — the list of exceptions now lives on Event.errors and the original exception instance is now Event.original_error. For example, this matches JavaScript & Ruby
Event.exception and Event.stacktrace have been deprecated as they are somewhat ambiguous given there can be multiple exceptions with their own stacktraces
I've also fixed up our code to avoid triggering these deprecations internally and tidied up some tests that were leaking warnings
Goal
This PR refactors our implementation of caused by exceptions to match other platforms — the list of exceptions now lives on
Event.errors
and the original exception instance is nowEvent.original_error
. For example, this matches JavaScript & RubyEvent.exception
andEvent.stacktrace
have been deprecated as they are somewhat ambiguous given there can be multiple exceptions with their own stacktracesI've also fixed up our code to avoid triggering these deprecations internally and tidied up some tests that were leaking warnings