Browse Source

API docs for convenience error throwers

pull/1040/head
Sami Vaarala 8 years ago
parent
commit
fa342235e8
  1. 7
      website/api/duk_error.yaml
  2. 7
      website/api/duk_error_va.yaml
  3. 23
      website/api/duk_eval_error.yaml
  4. 30
      website/api/duk_eval_error_va.yaml
  5. 23
      website/api/duk_generic_error.yaml
  6. 30
      website/api/duk_generic_error_va.yaml
  7. 23
      website/api/duk_range_error.yaml
  8. 30
      website/api/duk_range_error_va.yaml
  9. 23
      website/api/duk_reference_error.yaml
  10. 30
      website/api/duk_reference_error_va.yaml
  11. 23
      website/api/duk_syntax_error.yaml
  12. 30
      website/api/duk_syntax_error_va.yaml
  13. 23
      website/api/duk_type_error.yaml
  14. 30
      website/api/duk_type_error_va.yaml
  15. 23
      website/api/duk_uri_error.yaml
  16. 30
      website/api/duk_uri_error_va.yaml

7
website/api/duk_error.yaml

@ -38,5 +38,12 @@ seealso:
- duk_error_va
- duk_throw
- duk_push_error_object
- duk_generic_error
- duk_eval_error
- duk_range_error
- duk_reference_error
- duk_syntax_error
- duk_type_error
- duk_uri_error
introduced: 1.0.0

7
website/api/duk_error_va.yaml

@ -27,5 +27,12 @@ seealso:
- duk_error
- duk_throw
- duk_push_error_object
- duk_generic_error_va
- duk_eval_error_va
- duk_range_error_va
- duk_reference_error_va
- duk_syntax_error_va
- duk_type_error_va
- duk_uri_error_va
introduced: 1.1.0

23
website/api/duk_eval_error.yaml

@ -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

30
website/api/duk_eval_error_va.yaml

@ -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

23
website/api/duk_generic_error.yaml

@ -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

30
website/api/duk_generic_error_va.yaml

@ -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

23
website/api/duk_range_error.yaml

@ -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

30
website/api/duk_range_error_va.yaml

@ -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

23
website/api/duk_reference_error.yaml

@ -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

30
website/api/duk_reference_error_va.yaml

@ -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

23
website/api/duk_syntax_error.yaml

@ -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

30
website/api/duk_syntax_error_va.yaml

@ -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

23
website/api/duk_type_error.yaml

@ -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

30
website/api/duk_type_error_va.yaml

@ -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

23
website/api/duk_uri_error.yaml

@ -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

30
website/api/duk_uri_error_va.yaml

@ -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…
Cancel
Save