Raise statement
Example:
raise newException(IOError, "IO failed")
Apart from built-in operations like array indexing, memory allocation, etc. the raise statement is the only way to raise an exception.
If no exception name is given, the current exception is re-raised. The ReraiseDefect exception is raised if there is no exception to re-raise. It follows that the raise statement always raises an exception.
当前内容版权归 nim-lang.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 nim-lang.org .