to_raise function

Set raise error condition