![]() |
![]() |
![]() |
Seed Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <seed/seed.h> typedef SeedException; void seed_make_exception (SeedContext ctx, SeedException exception, const gchar *name, const gchar *message, ...); gchar * seed_exception_get_name (SeedContext ctx, SeedException exception); gchar * seed_exception_get_message (SeedContext ctx, SeedException exception); guint seed_exception_get_line (SeedContext ctx, SeedException exception); gchar * seed_exception_get_file (SeedContext ctx, SeedException exception); gchar * seed_exception_to_string (SeedContext ctx, SeedException exception);
void seed_make_exception (SeedContext ctx, SeedException exception, const gchar *name, const gchar *message, ...);
Creates a new JavaScript exception with the given attributes.
The line number and file name of the exception created will be undefined.
|
A SeedContext. |
|
A reference to a SeedException in which to store the exception. |
|
The gchar* representing the exception name. |
|
The gchar*, as a printf format string, representing the details of the exception. |
|
A list of printf-style format arguments to substitute in message .
|
gchar * seed_exception_get_name (SeedContext ctx, SeedException exception);
Retrieves the name of the given exception; this could be one of the predefined exception names given above, or your own name, which should be a single CamelCase word, preferably ending in something like "Error".
|
A SeedContext. |
|
A reference to a SeedException. |
Returns : |
A gchar* representing the name of exception .
|
gchar * seed_exception_get_message (SeedContext ctx, SeedException exception);
Retrieves the message of the given exception; this should be a human-readable string describing the exception enough that a developer could utilize the message in order to determine where to look to debug the problem.
|
A SeedContext. |
|
A reference to a SeedException. |
Returns : |
A gchar* representing the detailed message of exception .
|
guint seed_exception_get_line (SeedContext ctx, SeedException exception);
Retrieves the line number the given exception was thrown from; keep in mind that exceptions created from C have an undefined line number.
|
A SeedContext. |
|
A reference to a SeedException. |
Returns : |
A guint representing the line number from which exception
was thrown.
|
gchar * seed_exception_get_file (SeedContext ctx, SeedException exception);
Retrieves the file name the given exception was thrown from; keep in mind that exceptions created from C have an undefined file name.
|
A SeedContext. |
|
A reference to a SeedException. |
Returns : |
A gchar* representing the name of the file from which
exception was thrown.
|
gchar * seed_exception_to_string (SeedContext ctx, SeedException exception);
Properly formats the name, detailed message, line number, and file name of the given extension. This provides a consistent format for printed exceptions, to reduce confusion. Please use it if you're exposing exception data to the outside world.
|
A SeedContext. |
|
A reference to a SeedException. |
Returns : |
A gchar* representing the exception .
|