-
Notifications
You must be signed in to change notification settings - Fork 728
Allow passing custom error buffer to wasm_instance_new_with_args #1526
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
Allow passing custom error buffer to wasm_instance_new_with_args #1526
Conversation
This is helpful if the user uses different logging technique and wants to get error message back to their system
|
In my opinion, I don't suggest to change signature of any released public API. I always tend to create a new one. But in this case, I believe we should use |
|
i agree it's better to use a trap, at least for a subset of errors. |
|
makes sense, resolving as we already have #1751 |
Create trap for error message when wasm_instance_new fails: - Similar to [this PR](#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
…lliance#1751) Create trap for error message when wasm_instance_new fails: - Similar to [this PR](bytecodealliance#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
Create trap for error message when wasm_instance_new fails: - Similar to [this PR](#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
Create trap for error message when wasm_instance_new fails: - Similar to [this PR](#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
…lliance#1751) Create trap for error message when wasm_instance_new fails: - Similar to [this PR](bytecodealliance#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
…lliance#1751) Create trap for error message when wasm_instance_new fails: - Similar to [this PR](bytecodealliance#1526), but create a wasm_trap_t to output the error msg instead of adding error_buf to the API. - Trap will need to be deleted by the caller but is not a breaking change as it is only created if trap is not NULL. - Add error messages for all failure cases here, try to make them accurate but welcome feedback for improvements. Signed-off-by: Andrew Chambers <[email protected]>
This is helpful if the user uses different logging technique and wants to get error message back to their system
This breaks public API and I'm not sure how do we proceed with this kind of changes (assuming you're happy to accept it). Could you please provide a recommendation or point me to a process related to releasing backward-incompatible changes? Optionally we can make the last two arguments default (e.g. set
error_buftoNULLand if that's the case, thewasm_instance_new_with_argswill use internal buffer) however I find this a bit polluting the API, so would rather avoid default arguments in that case.