Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1
-
Fix Version/s: 6.3-milestone-1
-
Component/s: Velocity
-
Labels:None
-
Documentation in Release Notes:
-
Similar issues:
Description
It would be done using Commons Lang's ExceptionUtils class:
http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/exception/ExceptionUtils.html
Use case:
- script services should never throw exceptions
- instead they should return null (or empty string, etc)
- they should store the exception in the execution context and provide an API to access the exception
- it's up to the caller (*.vm files, wiki pages) to decide what to do when there's an error.
- In some *.vm files we need to display the error and being able to use $exceptiontool.getStackTrace($myscriptservice.lastError) would be nice. Otherwise it forces all script services to offer an API to transform an Exception into a String. In addition ExceptionUtils offers other interesting methods, such as getting the root cause, etc.
Attachments
Issue Links
- blocks
-
XWIKI-11050 Do not fail the UI when there's a problem rendering the document's content
-
- Closed
-