RbException
Swift
public struct RbException: CustomStringConvertible, Error
A Ruby exception.
This provides some convenience methods on top of the underlying Exception
object. RubyGateway does not throw these directly, it always wraps them in
an RbError
instance.
Create and throw one of these to raise a Ruby exception from
a block implemented in Swift by an RbBlockCallback
.
Topics
var exception: RbObject
var exception: RbObject
init(message: String)
init(message: String)
Construct a new Ruby RuntimeError
exception with the given message.
Use Kernel#raise
directly to raise a different type of exception.
Declaration
Swift
public init(message: String)
var backtrace: [String]
var backtrace: [String]
var description: String
var description: String