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
Currently, we utilize basic strings for errors, wrapping them within the various languages we have software in (JavaScript & AssemblyScript Error structure, Rust's Err structure, etc).
In the same way that we have standardized structures for the various cross-module operations we support (invoke & subinvoke for example), we should have a standardize error structure that is used.
Information within this structure would include:
Error Message
Source-map Info (file, line, column)
URI
Sub-Errors
Utilizing this information, we can re-create an error-stack, enabling them to further debug where the root cause came from.
Currently we do this through string concatenation & "good faith" that the error propagators in the stack appropriately concatenate to the error string.
Utilizing this method it'd be standard to "push" your error to the stack, and return it to the caller/user of your wrappers/plugins.
You start to get the idea. The idea is that we should have a more robust system around error messaging within the context of wrapper execution. This will allow users to better understand what's happened, and developers to better program around potential error scenarios (dep not found, dep intern error, etc etc).
instead of Result<T, string>, subinvocations will return Result<T, InvokeError>
instead of Result<T, Error>, client invocations will return Result<T, InvokeError>
InvokeError can be extended by UriResolutionError and possibly others?
InvokeError can have a pointer to another InvokeError, allowing for a linked list of errors that occurred during execution (e.g. using the "cause" property commonly supported in JS errors)
Activity
dOrgJelli commentedon Mar 4, 2022
Here's a quick brainstorm from @Niraj-Kamdar
https://hackmd.io/uuqcNzpCTwKDrbwSNp1sJg
krisbitney commentedon Nov 12, 2022
krisbitney commentedon Nov 15, 2022
My current thoughts are: