首页 > TAG信息列表 > getCurrentException

nim 8. 异常处理

基本的异常处理 try: let d = newSeq[int]() echo "value: ", d[2] except: let e = getCurrentException() echo "异常对象: ",repr(e), " 异常信息: ", getCurrentExceptionMsg() echo "另一种获取异常信息的方法: ", e.msg finally: echo "