From 8d4dae3b9fbdbf9ed1494d9dbcf6e16bc0ad0606 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 6 Aug 2007 13:39:43 +0000 Subject: (formatError) make it safer (it now handles exceptions containing " at ") --- lib/MDK/Common/String.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MDK/Common/String.pm b/lib/MDK/Common/String.pm index 40eee1d..fe2c299 100644 --- a/lib/MDK/Common/String.pm +++ b/lib/MDK/Common/String.pm @@ -101,7 +101,7 @@ sub formatError { my ($err) = @_; if (!$::testing) { $err =~ s/Uncaught exception from user code:\n\t//s; #- happens with "use diagnostics" - $err =~ s/ at .*?$/./s; + $err =~ s/ at \Q$0\E line .*?$/./s; } $err; } -- cgit v1.2.1