[Seasar-user:12928] Re: [Teeda]Exception の一括 catch について

小林 敬志 [E-MAIL ADDRESS DELETED]
2008年 2月 18日 (月) 20:34:00 JST


お世話になっております。
こばやしと申します。

ご返答ありがとうございます。

>ThrowsInterceptor を使ってはいかがでしょうか.
>
ご助言のようにinterceptorパッケージにThrowsInterceptorを継承するクラスを作成し、
handleThrowableメソッドを作成して試してみたのですが、
PageクラスでExceptionが発生した時に、handleThrowableメソッドに処理が遷移しておりません。
下記のサイトを見たところ、diconファイルの設定なしで問題ないように見えるのですが、
diconファイルの設定は必要なのでしょうか?
>http://s2container.seasar.org/2.4/ja/aop.html#ThrowsInterceptor

現在、teedaErrorPage.diconに以下のように記述しておりますが、影響ありますでしょうか?

		<initMethod name="addErrorPage">
			<arg>@[E-MAIL ADDRESS DELETED]</arg>
			<arg>"/view/errorForSystem.html"</arg>
		</initMethod>

なお、上記の記述を削除すると以下のようなエラーが発生し、handleThrowableメソッドに処理が遷移しておりません。

[ERROR] org.apache.catalina.core.StandardWrapperValve: 260 サーブレット facesServlet のServlet.service()が例外を投げました
java.lang.NullPointerException
	at java.util.regex.Matcher.appendReplacement(Matcher.java:692)
	at java.util.regex.Matcher.replaceAll(Matcher.java:806)
	at java.lang.String.replaceAll(String.java:2000)
…

よろしくお願い致します。
以上です。


>小林 (koichik) です.
>
>Date:    Mon, 18 Feb 2008 17:43:45 +0900
>From:    "小林 敬志 " <[E-MAIL ADDRESS DELETED]>
>To:      Seasar <[E-MAIL ADDRESS DELETED]>
>Subject: [Seasar-user:12922] [Teeda]Exception の一括 catch について
>
>> <質問>
>> 各PageクラスでthrowされるExceptionを一括してcatchし、
>> Exceptionのスタックトレース+メッセージをログに出力する処理を行いたいのですが、
>> 可能でしょうか?
>
>ThrowsInterceptor を使ってはいかがでしょうか.
>
>http://s2container.seasar.org/2.4/ja/aop.html#ThrowsInterceptor
>
>
>-- 
><component name="koichik">
>    <property name="fullName">"Koichi Kobayashi"</property>
>    <property name="email">"[E-MAIL ADDRESS DELETED]"</property>
>    <property name="blog">"http://d.hatena.ne.jp/koichik"</property>
></component>
>
>_______________________________________________
>Seasar-user mailing list
>[E-MAIL ADDRESS DELETED]
>https://ml.seasar.org/mailman/listinfo/seasar-user



Seasar-user メーリングリストの案内