Last modified by Thomas Mortagne on 2023/10/13

<
From version < 26.1 >
edited by Vincent Massol
on 2014/09/26
To version < 27.1 >
edited by Vincent Massol
on 2014/09/26
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -86,7 +86,7 @@
86 86  
87 87  == Ability to catch Exceptions from Velocity ==
88 88  
89 -A new Velocity Directive has been added to catch Exceptions from Velocity. In addition a new ###displayException()## velocity macro has also been added to nicely display an exception to the user.
89 +A new Velocity Directive has been added to catch Exceptions from Velocity. In addition a new ###displayUnexpectedException()## velocity macro has also been added to nicely display an exception to the user.
90 90  
91 91  For example:
92 92  
... ... @@ -111,7 +111,7 @@
111 111  ...
112 112  <div id="xwikicontent">
113 113   #if ("$!exception" != '')
114 - #displayException($exception)
114 + #displayUnexpectedException($exception)
115 115   #else
116 116   $renderedContent
117 117   #end
... ... @@ -123,6 +123,23 @@
123 123  
124 124  {{image reference="renderingerror.png"/}}
125 125  
126 +== New #displayException macro ==
127 +
128 +Displays an error message with a title that can be clicked and expands to display an exception.
129 +
130 +Example from a wiki page:
131 +
132 +{{code language="none"}}
133 +{{velocity}}
134 +#set ($message = $services.mailsender.createMessage())
135 +$message.send()
136 +
137 +{{html}}
138 +#displayException("hello world", $services.mailsender.lastError)
139 +{{/html}}
140 +{{/velocity}}
141 +{{/code}}
142 +
126 126  == Component Disposal ==
127 127  
128 128  The order used by the ComponentManager to dispose its components is computed based on declared dependencies. However there might be cases when you wish a Component's ##dispose()## method to be called before or after all other components. In this case you can use the ##DisposePriority## annotation. The default priority is 1000. A higher value will mean disposing before all other components not having this annotation. For example:

Get Connected