Граф коммитов

333 Коммитов

Автор SHA1 Сообщение Дата
ian%hixie.ch f3016f1bc8 Make sure to stringify the error string. 2003-01-15 23:48:41 +00:00
ian%hixie.ch ba14de95c4 Don't try to call the inherited DESTROY destructor, since UNIVERSAL doesn't have one... 2003-01-10 00:36:20 +00:00
ian%hixie.ch 5babb394c0 Propogate errors from the results frame for a nicer stack trace. 2003-01-10 00:21:08 +00:00
ian%hixie.ch cbaf4bd887 Support negative integers too 2003-01-10 00:20:37 +00:00
ian%hixie.ch f45fb75c09 TemplateToolkit doesn't support .defined on objects. Also, stringify objects early to avoid trying to apply .replace, etc, on them. 2003-01-10 00:19:47 +00:00
ian%hixie.ch 3f21fb08d5 PATH_INFO support. 2003-01-10 00:14:45 +00:00
ian%hixie.ch b7cc3989cc Escape newlines in keys. Explicitly mention empty arrays and hashes. Quote string values. Support undefined values. 2003-01-05 23:47:15 +00:00
ian%hixie.ch 26e1214c77 Oops, forgot to escape the backslashes when I pasted my TemplateToolkit file into Perl. 2003-01-03 00:47:32 +00:00
ian%hixie.ch 698ef1e5b4 Switch to a hopefully much faster debug.dumpVars template 2003-01-03 00:24:27 +00:00
ian%hixie.ch 13f84aed7f Three new filters: pad left, pad right, and indent lines, so that the first line can be indented a different amoun. 2003-01-02 22:32:42 +00:00
ian%hixie.ch ea3b32cc74 Turns out sprintf() is redundant with the format filter, so removing it. 2003-01-02 21:47:12 +00:00
ian%hixie.ch 219cd22e83 Make methodMissing use syntaxError instead of error(). Remove all the user level, error reporting and fatal handlers nonsense. Remove the debug() method. Update error() and assert() to be simply quick shortcuts to raising exceptions, using deep magic to make the stacktraces look good. 2003-01-02 20:39:49 +00:00
ian%hixie.ch b37eeb5e28 Propagate PLIF::Exceptions through TemplateToolkit code without stringifying them. 2003-01-02 20:34:27 +00:00
ian%hixie.ch aa6733b4e3 Make report also return the exception, so it can be reported and raised at the same time (useful for debugging). Make reraising of exceptions not wipe out the original stacktrace. Clean up stringification: Cope with calls from eval '...' blocks and sub { ... } blocks, also dump the environment, don't stringify object arguments, escape newlines in string arguments. 2003-01-02 20:33:10 +00:00
ian%hixie.ch 141786a409 Add some singulars up at the mulit-year level. 2002-12-31 23:36:59 +00:00
ian%hixie.ch dcc91791ba Nicer alignment. 2002-12-31 23:23:12 +00:00
ian%hixie.ch 1fa4f13d59 Replace Carp.pm with Exception.pm so that we have a consistent interface to exceptions and errors. Also add a syntaxError check in AUTOLOAD to make sure we don't call it when we shouldn't. 2002-12-30 08:04:29 +00:00
ian%hixie.ch a8b92c5fe0 Neaten up the arguments display: limit the depth, allow integers to be unquoted as well as floats, crop long strings. 2002-12-30 08:02:40 +00:00
ian%hixie.ch 25d42a3e3d Remove bogus argument, and add error checking code to catch similar errors in future 2002-12-30 07:52:19 +00:00
ian%hixie.ch 3de5e5c389 Export the syntaxError function, which reports a syntax error where the caller was invoked. 2002-12-30 07:30:43 +00:00
ian%hixie.ch 878199021e Reduce the number of sites that call 'caller'. Let's hope that this doesn't get optimised too much, or else the line numbers will start getting increasingly inaccurate... 2002-12-30 07:28:45 +00:00
ian%hixie.ch 02c3e8badc Add support for reporting Exceptions as warnings, for parity with, and so that PLIF can transition from, Carp.pm 2002-12-30 07:06:34 +00:00
ian%hixie.ch c42854be6b Remove debugging code that accidentally got checked in. 2002-12-30 06:43:27 +00:00
ian%hixie.ch db5becd2d1 Clean up the stack trace code: make stacktrace smarter about where the exception should be reported from, make it know about the arguments to the functions, make the stringifier know about try{} blocks 2002-12-30 06:40:05 +00:00
ian%hixie.ch 538858fa7c Additional comments explaining what might happen in cases of key clashes. 2002-12-29 21:02:59 +00:00
ian%hixie.ch 454c674af9 Minor grammatical fix. 2002-12-29 21:02:22 +00:00
ian%hixie.ch c92c1ff58d Fixing the support for the 'attempt()' method on databases, which was broken while fixing the fallout from the Exception stuff. 2002-12-29 03:56:00 +00:00
ian%hixie.ch 9f44a14e09 Allow catch...with statements to not be followed by anything. Also add a little debug code. 2002-12-28 18:24:27 +00:00
ian%hixie.ch c55ddb73a7 Unify the statement execution methods so that we can have consistent exception raising 2002-12-28 18:23:24 +00:00
ian%hixie.ch 4413395fdd Add rudimentary stacktrace support to the Exception library 2002-12-28 03:31:59 +00:00
ian%hixie.ch ac03050fbd Propagate the results out of the 'row' function correctly again -- the wantarray context isn't maintained inside a try block, unfortunately 2002-12-28 03:27:23 +00:00
ian%hixie.ch 35d6a3a24b Update PLIF to take advantage of the new PLIF exception handling library 2002-12-26 04:37:22 +00:00
ian%hixie.ch 0884ae5dbd Fix the context-sensitive code to actually work. Fix the result returning code to actually work too. Make wrapped exceptions include actual filename and line info. 2002-12-26 04:35:17 +00:00
ian%hixie.ch 03370dd21a Rename 'handle' to 'catch' and 'unhandled' to 'fallthrough', so that we get fewer clashes with existing code. 2002-12-26 03:33:22 +00:00
ian%hixie.ch 432f287a41 Remove trailing spaces, add a missing parenthesis, add 'otherwise' to the list of exported keywords, support 'ne' operator on exception objects. 2002-12-26 03:11:34 +00:00
ian%hixie.ch fba0aef5f8 Add support for an "otherwise" block which is called if no exception is triggered. Also, refactor the code to shorten it a bit. 2002-12-26 02:07:19 +00:00
ian%hixie.ch c04478210d Handle exceptions raised inside exception blocks by reraising them after the finally block. This code is going to need some refactoring at some point... 2002-12-25 16:48:54 +00:00
ian%hixie.ch e9059a839b If the exception isn't handled, it should be re-raised. 2002-12-25 16:20:03 +00:00
ian%hixie.ch 1a946bce34 Minor comment fixup 2002-12-25 14:14:11 +00:00
ian%hixie.ch bf07ded92b Change the semantics of |try| to return the result of the try block when no exception is raised. 2002-12-25 12:37:38 +00:00
ian%hixie.ch 041dc55e8b Add basic stringification to exceptions 2002-12-25 12:20:34 +00:00
ian%hixie.ch 20ba6cd9cc A standalone class to provide thorough Exception handling in Perl. This, like the Magic* classes, could easily be used separate from PLIF. 2002-12-25 00:39:40 +00:00
ian%hixie.ch d58312c949 Remove the annoying 'tried to log in but was already logged in' warning that would be hit each time someone clicked a link to, or used a bookmark to, a login page. 2002-12-23 11:49:01 +00:00
ian%hixie.ch 41e0fc2f0f Mark GET and HEAD requests as idempotent. Commands still have to explicitly support this, of course. 2002-12-23 11:47:20 +00:00
ian%hixie.ch dd9c968cf4 Add support for cookies using the new getSessionData() API. 2002-12-23 11:46:30 +00:00
ian%hixie.ch 582c64044b Minor fixups on the regexps. Add support for '--' to signal the end of the arguments (although at the moment it only cancels the previous argument rather than indicating the end of any flag arguments). Change the --batch-force-defaults to be the default --batch mode, and make the old --batch mode be called --batch-no-defaults. This could change again later. 2002-12-23 11:45:37 +00:00
ian%hixie.ch 5797226c81 since the default getMetaData() does the same now, removing this redundant implementation 2002-12-23 11:42:57 +00:00
ian%hixie.ch 2ee0bed13a Change getMetaData() to default to undef rather than requiring that it be implemented in descendants. Introduce getSessionData() for things like cookies. Introduce idempotent() so that protocols that can guarentee side-effect-free requests have a way of signalling their wishes. 2002-12-23 11:41:53 +00:00
ian%hixie.ch 7137b1b2e5 user prefs should be a POST not a GET. 2002-12-23 11:39:43 +00:00
ian%hixie.ch d5fc950aa6 Have to escape the error message, otherwise it gets treated as HTML, oops\! 2002-12-23 11:38:50 +00:00