-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(stdlib): Add Exception.toString
#2143
Merged
ospencer
merged 7 commits into
grain-lang:main
from
spotandjake:spotandjake-exception-tostring
Sep 22, 2024
Merged
feat(stdlib): Add Exception.toString
#2143
ospencer
merged 7 commits into
grain-lang:main
from
spotandjake:spotandjake-exception-tostring
Sep 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spotandjake
requested review from
ospencer,
peblair,
jozanza,
phated,
alex-snezhko and
marcusroberts
as code owners
August 15, 2024 22:23
I'm not against reworking the libraries in this way, but it borders on being a breaking change. It's only not technically breaking because there isn't a way to catch exceptions. I'd be more comfortable releasing this in a breaking release. |
ospencer
reviewed
Aug 17, 2024
spotandjake
force-pushed
the
spotandjake-exception-tostring
branch
from
August 31, 2024 18:26
f4260bf
to
0008e64
Compare
ospencer
reviewed
Sep 21, 2024
spotandjake
force-pushed
the
spotandjake-exception-tostring
branch
from
September 21, 2024 17:26
0008e64
to
8f11b91
Compare
Made those changes |
Looks like you need to update the smallest program test. |
Fixed |
ospencer
approved these changes
Sep 22, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr adds
Exception.toString
to theException
module closing #1334Implementation notes, I decided to rework the way we handle exception printers, moving
panic
into its own module inruntime/unsafe
and removing exception as a dependecy ofgc
andmalloc
. This allows us to useException
in a regular mode and avoid a lot of the memory leaks we had before. This also allows us to address theAssertionError
comment in theException
file because we can allocate strings safely now.If we are not happy with this implementation I am happy to go back to how we handled things before and implement
Exception.toString
the way we did it before.