Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はMVCアプリケーションにElmahを使用していますが、私の質問は
Elmahを使用するときにtrycatchステートメントを記述しないのは悪い習慣ですか?
ELMAHは、未処理の例外をログに記録するために使用されます。例外を処理できる場合は、処理することを強くお勧めします。
それでも例外をELMAHに記録したい場合は、次のようにすることができます。
try { ... } catch (Exception e) { Elmah.ErrorSignal.FromCurrentContext().Raise(e) }