运行时恐慌
少于1分钟
Run-time panics 运行时恐慌
Execution errors such as attempting to index an array out of bounds trigger a run-time panic equivalent to a call of the built-in function panic
with a value of the implementation-defined interface type runtime.Error
. That type satisfies the predeclared interface type error
. The exact error values that represent distinct run-time error conditions are unspecified.
执行错误,如试图对一个数组进行超界索引,会触发运行时恐慌,它等同于带由实现所定义的接口类型 runtime.Error
的值来对内置函数 panic 的调用。这个类型满足预先声明的接口类型error。表示不同的运行时错误条件的确切的错误值是未指定的。
|
|