parcel | Clownfish |
class variable | CFISH_ERR |
struct symbol | cfish_Err |
class nickname | cfish_Err |
header file | Clownfish/Err.h |
Clownfish::Err – Exception.
Clownfish::Err is the base class for exceptions in the Clownfish object hierarchy.
The Err module also provides access to a per-thread Err shared variable via set_error() and get_error(). It may be used to store an Err object temporarily, so that calling code may choose how to handle a particular error condition.
void
cfish_Err_set_error(
cfish_Err *error // decremented
);
Set the global error object, a per-thread Err shared variable.
cfish_Err*
cfish_Err_get_error(void);
Retrieve the global error object, a per-thread Err shared variable.
cfish_Err* // incremented
cfish_Err_trap(
CFISH_Err_Attempt_t routine,
void *context
);
Run routine
within the host’s exception handling
environment, catching and returning any errors that occur.
If an unrecognized host exception is trapped, it will be wrapped in an Err so that it can be handled by Clownfish code.
Returns: an Err, or NULL if no exception occurs.
cfish_String* // incremented
cfish_Err_To_String(
cfish_Err *self
);
Return a copy of the error message.
void
cfish_Err_Cat_Mess(
cfish_Err *self,
cfish_String *mess
);
Concatenate the supplied argument onto the error message.
cfish_String*
cfish_Err_Get_Mess(
cfish_Err *self
);
Return the error message.
Clownfish::Err is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.