mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
8 years ago
16 changed files with 385 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||
name: duk_eval_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_eval_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_EVAL_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_eval_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_eval_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_eval_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_EVAL_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_eval_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_eval_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_generic_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_generic_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_generic_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_generic_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_generic_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_generic_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_generic_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_range_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_range_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_RANGE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_range_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_range_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_range_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_RANGE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_range_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_range_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_reference_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_reference_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_REFERENCE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_reference_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_reference_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_reference_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_REFERENCE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_reference_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_reference_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_syntax_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_syntax_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_SYNTAX_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_syntax_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_syntax_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_syntax_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_SYNTAX_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_syntax_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_syntax_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_type_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_type_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_TYPE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_type_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_type_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_type_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_TYPE_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_type_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_type_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,23 @@ |
|||
name: duk_uri_error |
|||
|
|||
proto: | |
|||
duk_ret_t duk_uri_error(duk_context *ctx, const char *fmt, ...); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error">duk_error()</a></code> with an error code |
|||
<code>DUK_ERR_URI_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
return duk_uri_error(ctx, "my error: %d", (int) argval); |
|||
|
|||
tags: |
|||
- error |
|||
|
|||
seealso: |
|||
- duk_error |
|||
|
|||
introduced: 2.0.0 |
@ -0,0 +1,30 @@ |
|||
name: duk_uri_error_va |
|||
|
|||
proto: | |
|||
duk_ret_t duk_uri_error_va(duk_context *ctx, const char *fmt, va_list ap); |
|||
|
|||
stack: | |
|||
[ ... ] -> [ ... err! ] |
|||
|
|||
summary: | |
|||
<p>Convenience API call, equivalent to |
|||
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code |
|||
<code>DUK_ERR_URI_ERROR</code>.</p> |
|||
|
|||
example: | |
|||
void my_uri_error(duk_context *ctx, const char *fmt, ...) { |
|||
va_list ap; |
|||
|
|||
va_start(ap, fmt); |
|||
duk_uri_error_va(ctx, fmt, ap); |
|||
va_end(ap); |
|||
} |
|||
|
|||
tags: |
|||
- error |
|||
- vararg |
|||
|
|||
seealso: |
|||
- duk_error_va |
|||
|
|||
introduced: 2.0.0 |
Loading…
Reference in new issue