Skip to content
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

RaiseException should return ! #1382

Closed
lzybkr opened this issue Dec 10, 2021 · 3 comments · Fixed by #1485
Closed

RaiseException should return ! #1382

lzybkr opened this issue Dec 10, 2021 · 3 comments · Fixed by #1485
Labels
enhancement New feature or request

Comments

@lzybkr
Copy link
Member

lzybkr commented Dec 10, 2021

Motivation

I want to raise an exception from a alloc_error_handler so my callers can optionally return E_OUTOFMEMORY if they don't want to exit.

The error handler in Rust is defined to return ! (doesn't return), so it would seem like I could just call RaiseException.

As things are now, I have to call core::intrinsics::abort in my handler.

Drawbacks

No response

Rationale and alternatives

No response

Additional context

No response

@lzybkr lzybkr added the enhancement New feature or request label Dec 10, 2021
@kennykerr
Copy link
Collaborator

This is blocked on microsoft/win32metadata#764

@kennykerr kennykerr removed the enhancement New feature or request label Jan 31, 2022
@kennykerr kennykerr added enhancement New feature or request and removed blocked labels Feb 1, 2022
@kennykerr
Copy link
Collaborator

The metadata now includes the necessary attribute to indicate such functions and #1485 brings support to Rust.

@kennykerr
Copy link
Collaborator

0.32.0 has now been published and includes this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants