UNPKG

2.26 kBJSONView Raw
1{
2 "title": "CodeError",
3 "@id": "stencila:CodeError",
4 "extends": "Entity",
5 "role": "tertiary",
6 "status": "unstable",
7 "category": "code",
8 "description": "An error that occurred when parsing, compiling or executing a Code node.",
9 "properties": {
10 "type": {
11 "@id": "schema:type",
12 "description": "The name of the type.",
13 "type": "string",
14 "enum": [
15 "CodeError"
16 ],
17 "default": "CodeError",
18 "from": "Entity"
19 },
20 "id": {
21 "@id": "schema:id",
22 "description": "The identifier for this item.",
23 "type": "string",
24 "from": "Entity"
25 },
26 "meta": {
27 "@id": "stencila:meta",
28 "description": "Metadata associated with this item.",
29 "type": "object",
30 "from": "Entity"
31 },
32 "errorType": {
33 "@id": "stencila:errorType",
34 "description": "The type of error e.g. \"SyntaxError\", \"ZeroDivisionError\".",
35 "$comment": "Many languages have the concept of alternative types of errors.\nFor example, Python has various [classes of exceptions](https://docs.python.org/3/tutorial/errors.html).\nThis property is intended to be used for storing these type names as additional\ninformation that maybe useful to the user attempting to resolve the error.\n",
36 "type": "string",
37 "from": "CodeError"
38 },
39 "errorMessage": {
40 "@id": "stencila:errorMessage",
41 "aliases": [
42 "message"
43 ],
44 "description": "The error message or brief description of the error.",
45 "type": "string",
46 "from": "CodeError"
47 },
48 "stackTrace": {
49 "@id": "stencila:stackTrace",
50 "aliases": [
51 "trace"
52 ],
53 "description": "Stack trace leading up to the error.",
54 "type": "string",
55 "from": "CodeError"
56 }
57 },
58 "required": [
59 "type",
60 "errorMessage"
61 ],
62 "file": "CodeError.schema.yaml",
63 "children": [],
64 "descendants": [],
65 "$schema": "http://json-schema.org/draft-07/schema#",
66 "$id": "https://schema.stenci.la/v1/CodeError.schema.json",
67 "source": "https://github.com/stencila/schema/blob/master/schema/CodeError.schema.yaml",
68 "type": "object",
69 "propertyAliases": {
70 "message": "errorMessage",
71 "trace": "stackTrace"
72 },
73 "additionalProperties": false
74}