PerlerのRuby日記

Rubyとか

raiseで投げる例外クラス

raiseで投げる例外クラスは、Exceptionクラスを継承しなければならないみたい。

class Hoge
end

raise Hoge
#=> TypeError: exception class/object expected