-
-
Notifications
You must be signed in to change notification settings - Fork 355
Allow verbose printing of cause #5132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 5c45321 The changes in this PR will be included in the next version bump. This PR includes changesets to release 34 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
lines[i] | ||
.replace(/at .*effect_instruction_i.*\((.*)\)/, "at $1") | ||
.replace(/EffectPrimitive\.\w+/, "<anonymous>") | ||
) | ||
} | ||
|
||
if (span) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to be updated as well, to insert spans at a specific position in the stack when verbose=true
@@ -1035,14 +1041,14 @@ const prettyErrorStack = (message: string, stack: string, span?: Span | undefine | |||
export const spanSymbol = Symbol.for("effect/SpanAnnotation") | |||
|
|||
/** @internal */ | |||
export const prettyErrors = <E>(cause: Cause.Cause<E>): Array<PrettyError> => | |||
export const prettyErrors = <E>(cause: Cause.Cause<E>, verbose = true): Array<PrettyError> => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is exported as Cause.prettyErrors
, so this change does change the default behaviour of it
No description provided.