fn new(class: &str, msg: Option<&str>) -> Self {
        let class = util::inmost_rb_object(class);
        let msg = msg.map(|s| RString::new_utf8(s).value());

        Self::from(vm::call_method(class, "new", util::option_to_slice(&msg)))
    }
/// Construct a new Exception object, optionally passing in a message.
///
/// # Examples
/// ```
/// use rutie::{AnyException, Exception, Object, VM};
/// # VM::init();
///
/// assert_eq!(
///   AnyException::new("StandardError", None).to_s(),
///   "StandardError"
/// );
/// ```
///
/// A nested exception
///
/// ```
/// use rutie::{AnyException, Exception, Object, VM, Class};
/// # VM::init();
///
/// let mut klass = Class::new("MyGem", None);
/// let se = Class::from_existing("StandardError");
/// let _ = klass.define_nested_class("MyError", Some(&se));
///
/// assert_eq!(
///   AnyException::new("MyGem::MyError", None).to_s(),
///   "MyGem::MyError"
/// );
/// ```
Construct a new Exception object, optionally passing in a message.
Construct a new Exception object optionally passing in a message .
fn new(class: &str, msg: Option<&str>) -> Self {
        let class = util::inmost_rb_object(class);
        let msg = msg.map(|s| RString::new_utf8(s).value());
        Self::from(vm::call_method(class, "new", util::option_to_slice(&msg)))
    }
fn new ( class : & str , msg : Option < & str > ) -> Self { let class = util :: inmost_rb_object ( class ) ; let msg = msg . map ( | s | RString :: new_utf8 ( s ) . value ( ) ) ; Self :: from ( vm :: call_method ( class , " " , util :: option_to_slice ( & msg ) ) ) }
Construct a new Exception object, optionally passing in a message.
Construct a new Exception object optionally passing in a message .
class
&str
msg
Option<&str>
class
&str
msg
Option<&str>
examples
```
use rutie::{AnyException, Exception, Object, VM}.
` ` ` use rutie :: { AnyException Exception Object VM } .
vm::init();
assert_eq!(
AnyException::new("StandardError", None).to_s(),
"StandardError"
);
```

A nested exception

```
use rutie::{AnyException, Exception, Object, VM, Class}.
assert_eq! ( AnyException :: new ( " StandardError " None ) . to_s () " StandardError " ) ; ` ` ` A nested exception ` ` ` use rutie :: { AnyException Exception Object VM Class } .
vm::init();
let mut klass = Class::new("MyGem", None);
let se = Class::from_existing("StandardError");
let _ = klass.define_nested_class("MyError", Some(&se)).

assert_eq!(
AnyException::new("MyGem::MyError", None).to_s(),
"MyGem::MyError"
);
```
let mut klass = Class :: new ( " MyGem " None ) ; let se = Class :: from_existing ( " StandardError " ) ; let _ = klass . define_nested_class ( " MyError " Some ( &se )) . assert_eq! ( AnyException :: new ( " MyGem :: MyError " None ) . to_s () " MyGem :: MyError " ) ; ` ` `