web stats
Raising an error without an uncaught exception - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 10-24-2016, 11:49 AM
tthompso tthompso is offline
Mirth Newb
Join Date: Nov 2013
Location: Florida
Posts: 6
tthompso is on a distinguished road
Default Raising an error without an uncaught exception

I'm aware it is possible to mark the instance of a message as an error by throwing an uncaught error in the JavaScript destination transformer.

In a JavaScript Transformer is it possible to mark the message as "error" without throwing an uncaught exception?

something like message.status('Error')
Reply With Quote
Old 10-24-2016, 02:10 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

Not in the transformer, but in the response transformer you can override the status:

responseStatus = ERROR;
If you want the response transformer to execute even when there's no response data, you can set your response data types to Raw.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote

error, exception handling, message, throw

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 06:01 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation