Exception in log message action

2
Hi everybody, I get this exception in my application and I don't understand why and how to work around it. In a Microflow I'm calling a java-action. When an exception occurs, I log an errormessage (=log message activity in my custom-error-handling microflow that is set as errorHandler ) and I log a message with some static text and the $lastErrorType + $lastErrorMessage. Now I get an exception on the log message activity with this stacktrace. [1] Why is this? It seems it complains about one of these 2 variables being null or something, but aren't these filled automatically, [2] and if they have no value, shouldn't it be '' instead of null? [3] However, I now face the problem that I get this exception and NOT the exception that I was looking for (the exception from the 3rd party system). Can someone explain what may be the cause and how I can resolve it? com.mendix.core.CoreException: Exception occurred in action 'Microflow [MODULENAME.IVK_MY_MICROFLOW]', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.d(SourceFile:553) Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'MODULENAME.IVK_MY_MICROFLOW' for activity 'Call 'IVK_Handle_Order_Exception'', all database changes executed by this microflow were rolled back at kT.b(SourceFile:252) Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'MODULENAME.Handle_Order_Exception' for activity 'Log message (error)', all database changes executed by this microflow were rolled back ... 1 more Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: gG: Failed to evaluate expression, error occurred on line 1, character 1 $lastErrorType + $lastErrorMessage ^ at ae.a(SourceFile:91) Caused by: gG: Failed to evaluate expression, error occurred on line 1, character 1 $lastErrorType + $lastErrorMessage ^ at lh.a(SourceFile:42) Caused by: am: gG: Left or right hand side of binary expression should not be null at hH.b(SourceFile:41) Caused by: gG: Left or right hand side of binary expression should not be null at eV.b(SourceFile:91) at eV.a(SourceFile:43) at hH.b(SourceFile:33) at lh.a(SourceFile:35) at ae.a(SourceFile:87) at lb.a(SourceFile:52) at kT.a(SourceFile:72) at eU.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at iw.b(SourceFile:155) at com.mendix.core.Core.executeSync(SourceFile:167) at iv.a(SourceFile:71) at kT.a(SourceFile:67) at eU.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at iw.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:191) at dD.execute(SourceFile:183) at jx.a(SourceFile:299) at jx.a(SourceFile:230) at jx.processRequest(SourceFile:174) at fI.a(SourceFile:71) at com.mendix.core.MxRuntime.processRequest(SourceFile:938) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:42) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1007) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.server.nio.BlockingChannelConnector$ConnectorEndPoint.run(BlockingChannelConnector.java:187) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:636)999
asked
3 answers
1

This is a bug i think, can you file it at support.mendix.com?

You can try as work around the following microflow expression:

('' + $lastErrorType) + ('' + $lastErrorMessage)
answered
1

You can't add to empty values in a Microflow expression, what would that mean? Empty? double empty? One possible solution could be:

toString($lastErrorType) + toString($lastErrorMessage)
answered
0

Does it work if you remove $lastErrorType and just log $lastErrorMessage ?

It occurs to me that $lastErrorType may be an enumeration, so you may need to use toString($lastErrorType), but I'm just guessing here

answered