Article - CS306951
Exceptions thrown by Mashup Expressions are swallowed and not logged
Modified: 10-Dec-2024
Applies To
- ThingWorx Platform 8.4 to 9.6
Description
- Exceptions thrown by Mashup Expressions are swallowed and not logged
- For example, the following Expressions defaults to false when responseDate is null and responseDate.getTime() fails because of NPE :
responseDate.getTime() === 0 ? true : false
- This may also impact Mashup Validator
- Widget Validation function is not returning expected results based on Expression code
- For example, the Expression has a Log as the last entry of the code would result the Validation to a textfield widget never returns invalid:
- In a simple mashup, just put a textfield
- Add an Expression function that returns "valid" if the input value is upper a limit and lower than an other (else "invalid"). Add TW.log to see live log
- Bind the textfield text to function input
- Bind function output to Vaidation state
- Even enter an invalid value (as seen in mashup log), "ValidationOutput" returns "valid"
This is a printer-friendly version of Article 306951 and may be out of date. For the latest version click CS306951