2014-04-18 2 views

답변

2

예외 처리 메커니즘을 사용해야합니다. 예를 들어 :

begin 
    # here is the code that could raise ArgumentError 
rescue ArgumentError 
    puts "there was an error" 
else 
    puts "no error" 
end 

처리하고 예외를 발생하는 방법에 대한 자세한 내용은 official documentation를 참조하십시오.

관련 문제