Drkcore

21 08 2006 perl java Tweet

Error.pm

Inline::Java使っていてjavaのtry-catchってコンパイラに強制されてる感が強くてやだけど構文自体は読みやすくてよいよなと思ってたらperlでもtry-catch構文風なものが使えるようになるモジュールがあるそうだ。

qootas.org/blog - Perlにおけるtry catch

perl についてくるモジュール Error.pm を使うとこんな感じで書けます。

下の記事もわかりやすい。

perl.com: Object Oriented Exception Handling in Perl

The main goal of this article is to discuss in detail about exception handling in Perl and how to implement it using Error.pm. On our way, we'll be touching upon the advantages of using exception-handling over traditional error-handling mechanisms, exception handling with eval {}, problems with eval {} and the functionalities available in Fatal.pm. But by and large, our focus we'll be on using Error.pm for exception handling.

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021