panic
Fails with an error.
Arguments are displayed to the user (not rendered in the document) as
strings, converting with repr
if necessary.
Example
The code below produces the error panicked with: "this is wrong"
.
#panic("this is wrong")
参数参数参数是传给函数的输入,写在函数名后的括号中。
参数
参数是传给函数的输入,写在函数名后的括号中。
panic()
any
values
any必需参数必需参数必需参数在调用函数时必须传入。位置参数位置参数位置参数按顺序传入,不带参数名。变长参数变长参数变长参数可以传入多次。
any
必需参数
必需参数
必需参数在调用函数时必须传入。
位置参数
位置参数
位置参数按顺序传入,不带参数名。
变长参数
变长参数
变长参数可以传入多次。
The values to panic with and display to the user.