Nerodia Reference Manual

8.1. PyBaseException🔗

🔗def

A Python base exception object. That is, an instance of BaseException.

🔗def

The ultimate base class of Python exceptions, BaseException.

🔗def

Formats the exception as a Lean string, closely mirroring how Python would print it.

8.1.1. Raising Exceptions🔗

🔗def
Nerodia.raisePyRuntimeError {α : Type} (msg : String) : CPyIO α
Nerodia.raisePyRuntimeError {α : Type} (msg : String) : CPyIO α

Raises a PyRuntimeError with the given message msg.

🔗def

Raises a PyEOFError.

🔗def
Nerodia.raisePyTypeError {α : Type} (msg : String) : CPyIO α
Nerodia.raisePyTypeError {α : Type} (msg : String) : CPyIO α

Raises a PyTypeError with the given message msg.

🔗def
Nerodia.raisePyValueError {α : Type} (msg : String) : CPyIO α
Nerodia.raisePyValueError {α : Type} (msg : String) : CPyIO α

Raises a PyValueError with the given message msg.

🔗def
Nerodia.raisePyOSError {α : Type} (errno : UInt32) (strerror : String) (filename? : Option System.FilePath := none) : CPyIO α
Nerodia.raisePyOSError {α : Type} (errno : UInt32) (strerror : String) (filename? : Option System.FilePath := none) : CPyIO α

Raises a PyOSError (possibly a subclass) corresponding to the OS-specific errno with the system error message strerror and optional filename.