|
raise([error_type,][message][,traceback])
fail([error_type,][message][,traceback])
Raises an exception. In no argument given, re-raises last exception. With one arguments, raises the exception if the argument is the exception. If the argument is the string, raise creates a new RuntimeError exception, and raises it. If two arguments supplied, raise creates a new exception of type error_type, and raises it.
If the optional third argument traceback is specified, it must be the traceback infomation for the raising exception in the format given by variable $@ or caller function.
The exception is assigned to the variable $!, and the position in the source file is assigned to the $@.
The fail is an alias of the raise.
Add by Pancho
You can edit it here
|
|
Adding comments is available only for registered users.
|
If Spiders and Worms Can Do It, Why Can't We?
Imagine a material that is tougher than Kelvar or steel, yet remarkably flexible. It's something you can easily find in your attic or a lingerie store. It's as instantly recognizable today as it was to our early ancestors, yet we still aren't sure exactly how it's made. The miracle thread in question is natural silk, the ubiquitous fibers made by spiders and silkworms, which has been used throughout history for items ranging from stockings and parachutes to surgical sutures. Today ...
More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117415&WT.mc_id=USNSF_51&WT.mc_ev=click
This is an NSF News item.
|
|
PycckaR BepcuR
Articles

Library

Downloads

|