File: non-local_exit

package info (click to toggle)
ruby-bdb 0.6.5-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,028 kB
  • sloc: ansic: 13,984; cpp: 8,735; ruby: 7,869; sh: 47; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<entry index='n'>
<name>Non-Local Exit</name>
<reference>object</reference>
<reference>bug</reference>
<reference>exception</reference>
<reference>method</reference>
<reference>ruby</reference>
<content>
    Non-local exit (or global exit) is
    not an escape within the ranges of the ((methods|Method))
    such as ((|break|)), ((|next|)), ((|redo|)), ((|retry|)), and ((|return|)),
    but the type which interrupts going back the hierarchy of the method call
    as long as it's not caught.
    In ((Ruby)) there are two way:
    by ((exception|Exception)), or ((|catch|))/((|throw|)).

    Almost all exceptions can be caught with '((|rescue|))'
    (including ((|SystemExit|)) generated by exit),
    but the exception not significant to catching
    (example: Fail in memory allocation/interpreter's ((bug|Bug))
    does not become the ((object|Object)) to catch.

    ((|catch|))/((|throw|)) is the one which, when '((|throw|))' is done,
    jumps at a dash to catch with the same tag
    as the tag specified.
</content>
</entry>