]> git.nbdom.net Git - nb.git/commitdiff
parse_debug
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 Mar 2016 01:45:34 +0000 (01:45 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 Mar 2016 01:45:34 +0000 (01:45 +0000)
bin/dbq

diff --git a/bin/dbq b/bin/dbq
index 01e0ebf40c53f4149319d462fef1de781b2a6c16..7d3dc121315376f6c74ca5c7ae0a7ce58a3d2f89 100755 (executable)
--- a/bin/dbq
+++ b/bin/dbq
@@ -163,9 +163,9 @@ sub parse_debug {
   while (<>) {
 
     if (/DEBUG: /) { print STDERR $_ }
-    elsif ( /^(<\w+>)?(Parse error|Warning)/) { print STDERR html2txt($_) }
-    elsif ( /^<pre class="debug">/) { print STDERR html_unescape($_) }
+    elsif ( /^<pre class="(\w+)">/) { print STDERR uc($1).': '.html2txt($_) }
     elsif ( /^(<\w+>)?Fatal error/ .. /^\s+thrown in/) { print STDERR html2txt($_) }
+    elsif ( /^(<\s*\w+\s*\/?>)?(Parse error|Fatal error|Warning|Notice|$)/) { print STDERR $_ if ($_=html2txt($_)) and $_ !~ /^\s*$/ }
     else { print $_ }
 
   }