failWith.RdInspired from one of Hadley's functions (in plyr or something?)
failWith( default = NULL, expr, frame = parent.frame(), message = geterrmessage(), silent = FALSE, file = stderr() )
| default | the value to return if |
|---|---|
| expr | the expression to take a shot at |
| frame | the frame to evaluate the expression in |
| message | the error message to display if |
| silent | if |
| file | where msg sends the message |
the result of expr if successful, otherwise default value.