Skip to content

Question regarding safe check of part of message + secondary question regarding embedded language #4568

Answered by tonygermano
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

The code you write is javascript running on the Rhino engine (which allows it to access java libraries, but you are not writing java code.) Rhino supports all of ES5 and some of ES6 and later. You can check which features are supported here https://mozilla.github.io/rhino/compat/engines.html. The version of Rhino you are using depends on your mirth version.

To your first question a try will work well. I use this Code Template:

/**
	Try to run a function that may throw an exception and return the function's return value. Accepts
	either a default value or an error handler function in the event of an exception.

	@param {Function} fn - function to run
	@param {Any} onError - either a defaul…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@tonygermano
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant