fn throw_if_null<S>(&self, stmt: S, field: &JsField) -> Elements
        where S: Into<Statement>
    {
        let required_error = string(format!("{}: is a required field", field.name));
        js![if is_not_defined(stmt), js![throw required_error]]
    }
/// Build a function that throws an exception if the given value `stmt` is None.
Build a function that throws an exception if the given value `stmt` is None.
Build a function that throws an exception if the given value ` stmt ` is None .
fn throw_if_null<S>(&self, stmt: S, field: &JsField) -> Elements
        where S: Into<Statement>
    {
        let required_error = string(format!("{}: is a required field", field.name));
        js![if is_not_defined(stmt), js![throw required_error]]
    }
fn throw_if_null < S > ( & self , stmt : S , field : & JsField ) -> Elements where S : Into < Statement > { let required_error = string ( format ! ( " " field name ) ) ; js ! [ if is_not_defined ( stmt ) js [ throw required_error ] ] }
Build a function that throws an exception if the given value `stmt` is None.
Build a function that throws an exception if the given value ` stmt ` is None .
&self
stmt
S
field
&JsField
&self
stmt
S
field
&JsField