Closed brunnoferreira closed 1 month ago
The committers listed above are authorized under a signed CLA.
Thanks for the review, @vvydier!
I just pushed a couple of minor changes based on the results of the workflow, if you could please run it again when convenient.
One of my tests was flaky, so I got it fixed. Also turns out NSException
is not available on Linux despite being part of Foundation, so I made sure we don't try compiling it there.
This pull request aims to resolve #117.
Since Swift does not offer a superclass like Throwable in Java to group all exception types, one challenge facing these changes is a polluted API, with a long list of methods to encompass
NSException
,NSError
andError
.To work around that problem I have chosen to include a new protocol named
SpanException
, describing the basic properties required to create a meaningful exception event. That, alongside extensions that automatically conform bothNSError
(and, automatically,Error
) andNSException
, should cater for most use cases. For everything else, users should simply need to conform their custom types toSpanException
.If there is any feedback on this, please let me know – happy to update as we go.