Skip to content

Commit

Permalink
capi: Add a not about exceptions thrown from host functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Mar 17, 2021
1 parent 01b6963 commit 8ab6dba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fizzy/fizzy.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ typedef struct FizzyExecutionResult
/// @param args Pointer to the argument array. Can be NULL iff function has no inputs.
/// @param depth Call stack depth.
/// @return Result of execution.
///
/// @note
/// External functions implemented in C++ must be non-throwing, i.e. the effect of any exception
/// escaping the function is std::terminate being called.
typedef FizzyExecutionResult (*FizzyExternalFn)(
void* context, FizzyInstance* instance, const FizzyValue* args, int depth);

Expand Down

0 comments on commit 8ab6dba

Please sign in to comment.