|
node-addon-layer
C API For writing Node modules
|
Functions | |
| shim_val_t * | shim_error_new (shim_ctx_t *ctx, const char *msg,...) |
| shim_val_t * | shim_error_type_new (shim_ctx_t *ctx, const char *msg,...) |
| shim_val_t * | shim_error_range_new (shim_ctx_t *ctx, const char *msg,...) |
| shim_bool_t | shim_exception_pending (shim_ctx_t *ctx) |
| void | shim_exception_clear (shim_ctx_t *ctx) |
| void | shim_exception_set (shim_ctx_t *ctx, shim_val_t *val) |
| shim_bool_t | shim_exception_get (shim_ctx_t *ctx, shim_val_t *rval) |
| void | shim_throw_error (shim_ctx_t *ctx, const char *msg,...) |
| void | shim_throw_type_error (shim_ctx_t *ctx, const char *msg,...) |
| void | shim_throw_range_error (shim_ctx_t *ctx, const char *msg,...) |
Methods for errors
| shim_val_t* shim_error_new | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
Create a new error
| ctx | Currently executing context |
| msg | The message to be used for error |
| ... | Arguments for formatting |
| shim_val_t* shim_error_range_new | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
create a new RangeError
| ctx | Currently executing context |
| msg | The message to be used for error |
| ... | Arguments for formatting |
| shim_val_t* shim_error_type_new | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
Create a new TypeError
| ctx | Currently executing context |
| msg | The message to be used for error |
| ... | Arguments for formatting |
| void shim_exception_clear | ( | shim_ctx_t * | ctx) |
Clear any pending exception
| ctx | Currently executing context |
| shim_bool_t shim_exception_get | ( | shim_ctx_t * | ctx, |
| shim_val_t * | rval | ||
| ) |
Get the pending exception
| ctx | Currently executing context |
| rval | The currently pending exception |
| shim_bool_t shim_exception_pending | ( | shim_ctx_t * | ctx) |
Check if there is a pending exception
| ctx | Currently executing context |
| void shim_exception_set | ( | shim_ctx_t * | ctx, |
| shim_val_t * | val | ||
| ) |
Set the pending exception
| ctx | Currently executing context |
| val | The error to use as the pending exception |
| void shim_throw_error | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
Throw an error
| ctx | Currently executing context |
| msg | The message to set as the pending exception |
| ... | Arguments for formatting |
| void shim_throw_range_error | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
Throw a RangeError
| ctx | Currently executing context |
| msg | The message to set as the pending exception |
| ... | Arguments for formatting |
| void shim_throw_type_error | ( | shim_ctx_t * | ctx, |
| const char * | msg, | ||
| ... | |||
| ) |
Throw a TypeError
| ctx | Currently executing context |
| msg | The message to set as the pending exception |
| ... | Arguments for formatting |
1.8.4