构造一个由于开发者错误而丢弃的例外对象, e.g .,无效参数,
参数超出范围等。 这一例外只应在开发期间提出;
它通常表示调用代码中的错误. 这个例外不应该是
被捕获;相反,调用代码应该努力不生成它.
On the other hand, a
On the other hand, a
RuntimeError indicates an exception that may
be thrown at runtime, e.g., out of memory, that the calling code should be prepared
to catch.
| Name | Type | Description |
|---|---|---|
message |
string | optional 此例外的错误消息 . |
See:
Extends
- Error