Exceptions: Difference between revisions

Content added Content deleted
Line 285: Line 285:
=={{header|Factor}}==
=={{header|Factor}}==
===Throw Exceptions===
===Throw Exceptions===
"Install Linux, Problem Solved" throw
"Install Linux, Problem Solved" throw

TUPLE: velociraptor ;
\ velociraptor new throw

Or a shorthand for this:
ERROR: velociraptor ;
velociraptor


TUPLE: velociraptor ;
\ velociraptor construct-empty throw
===Catch Exceptions===
===Catch Exceptions===
! Preferred exception handling
! Preferred exception handling