DEBUG_PROPAGATE_EXCEPTIONSな設定が追加されたよ。
Django の r7537 で django/conf/global_settings.py に DEBUG_PROPAGATE_EXCEPTIONS な設定が追加されたよ。 デフォルトはFalseなんだけども、Trueにするとエラー吐いた時(500とか)に何も加工せずにベタ表示してくれる。
settings.py に書き足して上書きしてやると、
DEBUG_PROPAGATE_EXCEPTIONS = True
Exception処理の部分でスイッチされる。
# django/core/handlers/base.py@119行目あたり
if settings.DEBUG_PROPAGATE_EXCEPTIONS:
raise #<-- 受け取ったExceptionをもう一回投げる
elif settings.DEBUG:
from django.views import debug
return debug.technical_500_response(request, *exc_info)
テストとかに使えるって事なんだろうけども、
今のところイマイチ使いどころが想像出来ないなぁ ![]()
- Posted at:
- 2008/05/18 17:14:00
- 4 Comments
- 1 TrackBack
- Trackback:
- http://humming.via-kitchen.com/2008/05/18/added-debug-propagate-exceptions-setting/trackback/
TrackBacks
[Django][Google App Engine][HIGE]巡回 - 常山日記
Google Code: i-cat App to have the inventory of the books/music/movies Blog: adminサイトのバグ修正メモ DEBUG_PROPAGATE_EXCEPTIONSな設定が追加されたよ。 Building a Book Inventory in Django Happy birthday Review Board! Google App Engine: Google App Engine
- Created at:
- 2008/05/19 00:52:03
Comments
ENDLESS
ねっ!どこで使うんだろうね.
This is useful under some testing siutations, and should never be used on a live site.
ってコメント書いてあるから,テストで役に立つのかなぁ〜.
このコメント「siutations」ではなく「situation」のスペルミス!?
nobu
>某氏
あれ?ココでsituationsっておかしいの?
無知ですんませんです。
ENDLESS
あ.すまそ!「s」つけ忘れた.
siutations ではなく,situations.ですね.縦に並べた方がわかりやすいかな.
siutations
situations
単なる t とu が逆というくだらない話です.とぅいまてーん.
nobu
>某氏
あーなるほど!typoしとるって事ね