Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby30 /
share /
doc /
alt-ruby30-doc /
syntax /
Delete
Unzip
Name
Size
Permission
Date
Action
assignment.rdoc
11.56
KB
-rw-r--r--
2024-04-23 13:53
calling_methods.rdoc
11.11
KB
-rw-r--r--
2024-04-23 13:53
comments.rdoc
7.27
KB
-rw-r--r--
2024-04-23 13:53
control_expressions.rdoc
14.2
KB
-rw-r--r--
2024-04-23 13:53
exceptions.rdoc
2.16
KB
-rw-r--r--
2024-04-23 13:53
literals.rdoc
11.23
KB
-rw-r--r--
2024-04-23 13:53
methods.rdoc
16.55
KB
-rw-r--r--
2024-04-23 13:53
miscellaneous.rdoc
3.78
KB
-rw-r--r--
2024-04-23 13:53
modules_and_classes.rdoc
8.25
KB
-rw-r--r--
2024-04-23 13:53
pattern_matching.rdoc
13.26
KB
-rw-r--r--
2024-04-23 13:53
precedence.rdoc
1.1
KB
-rw-r--r--
2024-04-23 13:53
refinements.rdoc
6.84
KB
-rw-r--r--
2024-04-23 13:53
Save
Rename
= Exception Handling Exceptions are rescued in a +begin+/+end+ block: begin # code that might raise rescue # handle exception end If you are inside a method, you do not need to use +begin+ or +end+ unless you wish to limit the scope of rescued exceptions: def my_method # ... rescue # ... end The same is true for a +class+, +module+, and +block+: [0, 1, 2].map do |i| 10 / i rescue ZeroDivisionError nil end #=> [nil, 10, 5] You can assign the exception to a local variable by using <tt>=> variable_name</tt> at the end of the +rescue+ line: begin # ... rescue => exception warn exception.message raise # re-raise the current exception end By default, StandardError and its subclasses are rescued. You can rescue a specific set of exception classes (and their subclasses) by listing them after +rescue+: begin # ... rescue ArgumentError, NameError # handle ArgumentError or NameError end You may rescue different types of exceptions in different ways: begin # ... rescue ArgumentError # handle ArgumentError rescue NameError # handle NameError rescue # handle any StandardError end The exception is matched to the rescue section starting at the top, and matches only once. If an ArgumentError is raised in the begin section, it will not be handled in the StandardError section. You may retry rescued exceptions: begin # ... rescue # do something that may change the result of the begin block retry end Execution will resume at the start of the begin block, so be careful not to create an infinite loop. Inside a rescue block is the only valid location for +retry+, all other uses will raise a SyntaxError. If you wish to retry a block iteration use +redo+. See {Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] for details. To always run some code whether an exception was raised or not, use +ensure+: begin # ... rescue # ... ensure # this always runs end You may also run some code when an exception is not raised: begin # ... rescue # ... else # this runs only when no exception was raised ensure # ... end