Skip to content

Commit

Permalink
Merge pull request #593 from w3f/rfc-abort-handler
Browse files Browse the repository at this point in the history
[PoC/WIP] Abort Handler Host API
  • Loading branch information
lamafab authored Feb 22, 2023
2 parents e585fc3 + c2c792e commit 798b59f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ab_host-api/_part.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ include::misc.adoc[]
include::allocator.adoc[]

include::logging.adoc[]

include::panic_handler.adoc[]
4 changes: 2 additions & 2 deletions ab_host-api/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Arguments::
* `target`: a pointer-size (<<defn-runtime-pointer-size>>) to the
string which contains the path, module or location from where the log was
executed.
* `message`: a pointer-size (<<defn-runtime-pointer-size>>) to the log
message.
* `message`: a pointer-size (<<defn-runtime-pointer-size>>) to the UTF-8 encoded
log message.
18 changes: 18 additions & 0 deletions ab_host-api/panic_handler.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=== Abort Handler

Interface for aborting the execution of the runtime.

==== `ext_panic_handler_abort_on_panic`
Aborts the execution of the runtime with a given message. Note that the message
will be only displayed if the host is enabled to display those types of
messages, which is implementation specific.

===== Version 1 - Prototype
----
(func $ext_panic_handler_abort_on_panic_version_1
(param $message i64))
----

Arguments::
* `message`: a pointer-size (<<defn-runtime-pointer-size>>) to the UTF-8 encoded
message.

0 comments on commit 798b59f

Please sign in to comment.