[TxMt] tiny improvements for perlmate.rb
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Fri Dec 1 14:55:21 UTC 2006
Alex
Now I'm able to distinguish separately:
-syntax errors (missing colons etc.)
via $SIG{__DIE__} = \&syserror;
-system errors
via $SIG{__DIE__} = \&syserror;
-system warnings (useless use of etc.)
via $SIG{__WARN__} = \&syswarn;
-user-defined warnings (warn("foo";)
via ::warn
-die statements
if it occurs within eval block
message will printed out and the program runs further
else
message will printed out and the program will be aborted due
to exception
In order to hide stderr for perlmate you have to write in perlmate.rb
class PerlMate < ScriptMate
def filter_stderr(str)
""
end
end
I don't use your 'sub id' except for 'sub warn'. Here everything
should be clear. Otherwise I trust Perl's error messages more than
'caller($level);'. Esp. for the case if Perl's message contains more
than one link like Carp::longmess() it often does.
Comments?
This code is up to now very redundant. It's only for testing!
-Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Archive.zip
Type: application/zip
Size: 2466 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061201/325f98bf/attachment.zip>
More information about the textmate
mailing list