Joel VanderWerf
4/29/2009 2:04:00 AM
RichardOnRails wrote:
> Hi All,
>
> I like to use the following form for handling error situations:
>
> ( puts "ERROR: Long msg";
> exit) if some_boolean _expression
>
> I want the multiple form because the error messages are often long and
> sometimes multi-line.
>
> Is there any way to improve it by getting rid of the parentheses?
if some_boolean_expression
puts "ERROR: Long msg"
exit
end #SCNR
Seriously, though, what about this:
abort "ERROR: Long msg " +
"more message" if true
or
abort %{
line 1
line 2
} if true
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407