Package =TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); | ||||||||
Added: | ||||||||
> > | ||||||||
On this page:
ClassMethod new ($template,...)
def parameter, see the oopsattention
template.
NOTE: parameter values are automatically and unconditionally entity-encoded
ObjectMethod stringify ([$session]) -> $stringGenerates a string representation for the object. if a session is passed in, and the exception specifies a def, then that def is expanded. This is to allow internal expansion of oops exceptions for example when performing bulk operations, and also for debugging.ObjectMethod redirect ($twiki)Generate a redirect to an 'oops' script for this exception. If the 'keep' parameter is set in the exception, it saves parameter values into the query as well. This is needed if the query string might get lost during a passthrough, due to a POST being redirected to a GET. |
Package =TWiki::OopsException | ||||||||
Deleted: | ||||||||
< < | extends Error | |||||||
Deleted: | ||||||||
< < | ||||||||
Exception used to raise a request to redirect to an Oops URL. | ||||||||
Added: | ||||||||
> > | ||||||||
An OopsException thrown anywhere in the code will redirect the | ||||||||
Changed: | ||||||||
< < | browser to a url based on the oops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the | |||||||
> > | browser to a url based on the oops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the | |||||||
parameter values passed to the exception instantiated. The result will be shown in the browser. | ||||||||
Added: | ||||||||
> > | Plugins may throw TWiki::OopsException. For example: | |||||||
Added: | ||||||||
> > | use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); | |||||||
On this page:
ClassMethod new ($template,...) | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
The remaining parameters are interpreted as key-value pairs. The following keys are used:
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > | For an example of how to use the def parameter, see the oopsattention
template. | |||||||
Added: | ||||||||
> > | NOTE: parameter values are automatically and unconditionally entity-encoded | |||||||
Added: | ||||||||
> > | ||||||||
ObjectMethod stringify ([$session]) -> $string | ||||||||
Changed: | ||||||||
< < | Generates a string representation for the object. if a session is passed in, and the excpetion specifies a def, then that def is expanded. This is to allow internal expansion of oops exceptions for example when performing bulk operations. | |||||||
> > | Generates a string representation for the object. if a session is passed in, and the exception specifies a def, then that def is expanded. This is to allow internal expansion of oops exceptions for example when performing bulk | |||||||
Added: | ||||||||
> > | operations, and also for debugging.
ObjectMethod redirect ($twiki)Generate a redirect to an 'oops' script for this exception. If the 'keep' parameter is set in the exception, it saves parameter values into the query as well. This is needed if the query string might get lost during a passthrough, due to a POST being redirected to a GET. | |||||||
Package =TWiki::OopsExceptionextends Error Exception used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
On this page:
ClassMethod new ($template,...)
| ||||||||
Changed: | ||||||||
< < | ObjectMethod stringify () -> $string | |||||||
> > | ObjectMethod stringify ([$session]) -> $string | |||||||
Changed: | ||||||||
< < | Generates a string representation for the object, mainly for debugging. | |||||||
> > | Generates a string representation for the object. if a session is passed in, and | |||||||
Added: | ||||||||
> > | the excpetion specifies a def, then that def is expanded. This is to allow internal expansion of oops exceptions for example when performing bulk operations. | |||||||
Package =TWiki::OopsExceptionextends Error Exception used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
On this page:
ClassMethod new ($template,...)
ObjectMethod stringify () -> $stringGenerates a string representation for the object, mainly for debugging. |