docs: 完善错误代码

This commit is contained in:
unanmed 2025-10-14 19:28:27 +08:00
parent 44b7711265
commit 42a9efe431
4 changed files with 210 additions and 171 deletions

View File

@ -6,6 +6,8 @@
Unexpected error when posting danmaku. Error info: $1 Unexpected error when posting danmaku. Error info: $1
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:发送弹幕时发生报错。 - 报错原因:发送弹幕时发生报错。
- 解决方案:查看后面的 Error info检查报错信息内容按照报错信息修复问题。 - 解决方案:查看后面的 Error info检查报错信息内容按照报错信息修复问题。
@ -24,6 +26,8 @@ Unexpected loading error in loading resource '$1/$2'. Error info: $3
Syntax error in parsing CSS: Unexpected ':'. Col: $1. CSS string: '$2 Syntax error in parsing CSS: Unexpected ':'. Col: $1. CSS string: '$2
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。 - 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。
- 解决方案:检查弹幕 CSS 语法是否正确。 - 解决方案:检查弹幕 CSS 语法是否正确。
@ -33,6 +37,8 @@ Syntax error in parsing CSS: Unexpected ':'. Col: $1. CSS string: '$2
Syntax error in parsing CSS: Unexpected ';'. Col: $1. CSS string: '$2' Syntax error in parsing CSS: Unexpected ';'. Col: $1. CSS string: '$2'
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。 - 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。
- 解决方案:检查弹幕 CSS 语法是否正确。 - 解决方案:检查弹幕 CSS 语法是否正确。
@ -42,6 +48,8 @@ Syntax error in parsing CSS: Unexpected ';'. Col: $1. CSS string: '$2'
Syntax error in parsing CSS: Missing property name after '-'. Col: $1. CSS string: '$2' Syntax error in parsing CSS: Missing property name after '-'. Col: $1. CSS string: '$2'
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。 - 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。
- 解决方案:检查弹幕 CSS 语法是否正确。 - 解决方案:检查弹幕 CSS 语法是否正确。
@ -51,6 +59,8 @@ Syntax error in parsing CSS: Missing property name after '-'. Col: $1. CSS strin
Syntax error in parsing CSS: Unexpected end of css, expecting ':'. Col: $1. CSS string: '$2' Syntax error in parsing CSS: Unexpected end of css, expecting ':'. Col: $1. CSS string: '$2'
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。 - 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。
- 解决方案:检查弹幕 CSS 语法是否正确。 - 解决方案:检查弹幕 CSS 语法是否正确。
@ -60,6 +70,8 @@ Syntax error in parsing CSS: Unexpected end of css, expecting ':'. Col: $1. CSS
Syntax error in parsing CSS: Unexpected end of css, expecting property value. Col: $1. CSS string: '$2' Syntax error in parsing CSS: Unexpected end of css, expecting property value. Col: $1. CSS string: '$2'
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。 - 报错原因:解析 CSS 时报错,一般是在发送弹幕时引起。
- 解决方案:检查弹幕 CSS 语法是否正确。 - 解决方案:检查弹幕 CSS 语法是否正确。
@ -69,6 +81,8 @@ Syntax error in parsing CSS: Unexpected end of css, expecting property value. Co
Post danmaku with not allowed css. Info: $1 Post danmaku with not allowed css. Info: $1
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 报错原因:弹幕 CSS 中使用了不允许的 css 属性类型。 - 报错原因:弹幕 CSS 中使用了不允许的 css 属性类型。
- 解决方案:目前仅支持 `color` `background-color` `font-size: x%` 属性。 - 解决方案:目前仅支持 `color` `background-color` `font-size: x%` 属性。
@ -133,7 +147,7 @@ Cannot use shader program for shader element that does not belong to it.
## ERROR CODE 18 ## ERROR CODE 18
```txt ```txt
Cannot delete shader program for shader element that does not belong to Cannot delete shader program for shader element that does not belong to it.
``` ```
- 报错原因:在一个着色器上删除了不属于这个着色器的着色器程序。 - 报错原因:在一个着色器上删除了不属于这个着色器的着色器程序。

View File

@ -24,6 +24,8 @@ Repeat load of resource '$1/$2'.
Unknown danmaku tag: $1 Unknown danmaku tag: $1
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 警告原因:出现了未知的弹幕标签(指 `[xxx:xxx]` - 警告原因:出现了未知的弹幕标签(指 `[xxx:xxx]`
- 解决方案:目前仅支持 `[i:xxx]` 标签,如果需要显示方括号,请使用 `\[\]` - 解决方案:目前仅支持 `[i:xxx]` 标签,如果需要显示方括号,请使用 `\[\]`
@ -33,6 +35,8 @@ Unknown danmaku tag: $1
Ignored a mismatched ']' in danmaku. Ignored a mismatched ']' in danmaku.
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 警告原因:出现了不能匹配的右方括号。 - 警告原因:出现了不能匹配的右方括号。
- 解决方案:如果需要显示方括号,请使用 `\[\]` - 解决方案:如果需要显示方括号,请使用 `\[\]`
@ -42,6 +46,8 @@ Ignored a mismatched ']' in danmaku.
Repeat post danmaku. Repeat post danmaku.
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 警告原因:同一个弹幕被发送了两次。 - 警告原因:同一个弹幕被发送了两次。
- 解决方案:确保一个弹幕实例只调用了一次 `post` 方法。 - 解决方案:确保一个弹幕实例只调用了一次 `post` 方法。
@ -51,6 +57,8 @@ Repeat post danmaku.
Registered special danmaku element: $1. Registered special danmaku element: $1.
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 警告原因:要注册的弹幕标签已经存在。 - 警告原因:要注册的弹幕标签已经存在。
- 解决方案:避免使用同一个标签名,如果内容不一样请换一个标签名。 - 解决方案:避免使用同一个标签名,如果内容不一样请换一个标签名。
@ -150,6 +158,8 @@ Floor-damage extension needs 'floor-binder' extension as dependency.
Uncaught error in posting like info for danmaku. Danmaku id: $1. Uncaught error in posting like info for danmaku. Danmaku id: $1.
``` ```
> 应该不会遇到这个报错,因为样板并不内置弹幕系统。
- 警告原因:为弹幕点赞时出现报错。 - 警告原因:为弹幕点赞时出现报错。
- 解决方案:可能是网络问题,检查网络。 - 解决方案:可能是网络问题,检查网络。
@ -159,6 +169,8 @@ Uncaught error in posting like info for danmaku. Danmaku id: $1.
Repeat light id: '$1' Repeat light id: '$1'
``` ```
> 应该不会遇到这个报错,因为样板并不内置点光源。
- 警告原因:重复的光源 id。 - 警告原因:重复的光源 id。
- 解决方案:避免光源 id 出现重复。 - 解决方案:避免光源 id 出现重复。
@ -284,8 +296,7 @@ Sub-image exceeds texture dimensions, auto adjusting size.
Cannot modify MotaOffscreenCanvas2D that is freezed. Cannot modify MotaOffscreenCanvas2D that is freezed.
``` ```
- 警告原因:不能修改已冻结的画布属性。 - 遇不到这个报错。
- 解决方案:如果这个画布后续还需要修改属性,那么就不要冻结它。
## WARN CODE 34 ## WARN CODE 34

View File

@ -116,3 +116,21 @@ Uncaught promise error in waiting box component. Error reason: $1
- 警告原因:在等待 box 组件(选择框、确认框等)时,出现了异步报错。 - 警告原因:在等待 box 组件(选择框、确认框等)时,出现了异步报错。
- 解决方案:根据报错内容解决问题。 - 解决方案:根据报错内容解决问题。
## WARN CODE 64
```txt
Text node type and block type mismatch: '$1' vs '$2'
```
- 警告原因多行文本TextContent解析时节点类型和分块类型不一致。
- 解决方案:理应不会遇到这个问题,如果遇到了,请到造塔群寻求帮助。
## WARN CODE 65
```txt
Cannot bind a weather controller twice.
```
- 警告原因:一个天气控制器不能绑定到两个元素上。
- 解决方案:如果两个元素需要天气,那么请创建两个天气控制器,一个天气控制器只能绑定一个,且不能解绑。

View File

@ -26,10 +26,7 @@
"24": "Cannot decode source type of '$1', since there is no registered decoder for that type.", "24": "Cannot decode source type of '$1', since there is no registered decoder for that type.",
"25": "Unknown audio type. Header: '$1'", "25": "Unknown audio type. Header: '$1'",
"26": "Uncaught error when fetching stream data from '$1'. Error info: $2.", "26": "Uncaught error when fetching stream data from '$1'. Error info: $2.",
"1101": "Shadow extension needs 'floor-hero' extension as dependency.", "1201": "Floor-damage extension needs 'floor-binder' extension as dependency."
"1201": "Floor-damage extension needs 'floor-binder' extension as dependency.",
"1301": "Portal extension need 'floor-binder' extension as dependency.",
"1401": "Halo extension needs 'floor-binder' extension as dependency."
}, },
"warn": { "warn": {
"1": "Resource with type of 'none' is loaded.", "1": "Resource with type of 'none' is loaded.",
@ -97,7 +94,6 @@
"63": "Uncaught promise error in waiting box component. Error reason: $1", "63": "Uncaught promise error in waiting box component. Error reason: $1",
"64": "Text node type and block type mismatch: '$1' vs '$2'", "64": "Text node type and block type mismatch: '$1' vs '$2'",
"65": "Cannot bind a weather controller twice.", "65": "Cannot bind a weather controller twice.",
"1001": "Item-detail extension needs 'floor-binder' and 'floor-damage' extension as dependency.", "1001": "Item-detail extension needs 'floor-binder' and 'floor-damage' extension as dependency."
"1101": "Cannot add new effect to point effect instance, for there's no more reserve space for it. Please increase the max count of the instance."
} }
} }