open static fun retrieveEngineByName(scriptEngineManager: ScriptEngineManager, engineName: String): ScriptEngine
Retrieve a ScriptEngine from the given ScriptEngineManager by name, delegating to ScriptEngineManager#getEngineByName but throwing a descriptive exception if not found or if initialization failed.
scriptEngineManager - the ScriptEngineManager to use
engineName - the name of the engine
IllegalArgumentException - if no matching engine has been found
IllegalStateException - if the desired engine failed to initialize
Return
a corresponding ScriptEngine (never null)