LoginSignup
1
1

More than 3 years have passed since last update.

例外処理

Posted at
  • 基本例外処理

begin
1 / 0 
rescue 
 p 1

end

  • 基本 実践
begin 
  1 / 0 

rescue ZeroDivisionError => e

 p e.backtrace
end

例外クラス

  • StandardError
  • ArgumentError
  • SyntaxError
  • NameError
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1