You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're going to add these as general purpose exceptions to Neon.Common and then use them immediately for #785.
The basic idea here is to provide a common way for frameworks like Neon.Cadence to be able to marshal a method call across processes such that exceptions thrown by the callee process can be rethrown (when possible) in the caller process.
The idea would be to implement ExceptionResult and ExceptionResult<TResult> classes. The first would be used for operations that return void and the second version would be used for operations that do return a result.
Both of these classes would include string ExceptionType and string ExceptionMessage properties. The idea is that workflows and activities would return one of these types and we'd have try/catch blocks in these methods that would catch exceptions and then set ExceptionType to the fully qualified name of the exception type and ExceptionMessage to the message text and then return the exception result instance if there was an exception or an exception result instance with these properties set to null when there was no exception.
The base ExceptionType class would have a static constructor that reflects all loaded assemblies to locate all known exception types to create a dictionary that maps the fully qualified names of any exceptions found to some code that can rethrow exceptions in the caller process.
It may be possible that the caller process does not have the same exception types that exist and were thrown by the callee. In this case, ExceptionType will throw a CatchAllException including the fully qualified name of the exception thrown by the callee as well as the exception message.
The text was updated successfully, but these errors were encountered:
We're going to add these as general purpose exceptions to Neon.Common and then use them immediately for #785.
The basic idea here is to provide a common way for frameworks like Neon.Cadence to be able to marshal a method call across processes such that exceptions thrown by the callee process can be rethrown (when possible) in the caller process.
The idea would be to implement
ExceptionResult
andExceptionResult<TResult>
classes. The first would be used for operations that return void and the second version would be used for operations that do return a result.Both of these classes would include
string ExceptionType
andstring ExceptionMessage
properties. The idea is that workflows and activities would return one of these types and we'd have try/catch blocks in these methods that would catch exceptions and then setExceptionType
to the fully qualified name of the exception type andExceptionMessage
to the message text and then return the exception result instance if there was an exception or an exception result instance with these properties set to null when there was no exception.The base
ExceptionType
class would have a static constructor that reflects all loaded assemblies to locate all known exception types to create a dictionary that maps the fully qualified names of any exceptions found to some code that can rethrow exceptions in the caller process.It may be possible that the caller process does not have the same exception types that exist and were thrown by the callee. In this case,
ExceptionType
will throw aCatchAllException
including the fully qualified name of the exception thrown by the callee as well as the exception message.The text was updated successfully, but these errors were encountered: