File: non-local_exit

package info (click to toggle)
libdb2-ruby 0.5.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,352 kB
  • ctags: 2,743
  • sloc: ansic: 11,156; ruby: 6,199; cpp: 6,064; makefile: 86; sh: 31
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>