From 45c42be0153b638549e1098fc0ff4af01c3172e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 23 Feb 2011 11:33:13 +0100 Subject: [PATCH] Sinnvollere Fehlermeldungen bei fehlerhaften Flash codes. --- SL/Helper/Flash.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Helper/Flash.pm b/SL/Helper/Flash.pm index f55366c17..2bbff75b1 100644 --- a/SL/Helper/Flash.pm +++ b/SL/Helper/Flash.pm @@ -46,7 +46,10 @@ sub _store_flash { sub _check_category { my ($c) = @_; return $valid_categories{$c} - || die 'invalid category for flash'; + || do { + require Carp; + croak("invalid category '$c' for flash"); + }; } 1; -- 2.20.1