@Override public Object call(String instanceName, String methodName, Object... args) throws SlimException { try { return getMethodExecutionResult(instanceName, methodName, args).returnValue(); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }
@Override public Object call(String instanceName, String methodName, Object... args) throws SlimException { try { return getMethodExecutionResult(instanceName, methodName, args).returnValue(); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }
@Override public void create(String instanceName, String className, Object... args) throws SlimException { try { context.create(instanceName, className, args); // TODO Hack for supporting SlimHelperLibrary, please remove. Object newInstance = context.getInstance(instanceName); if (newInstance instanceof StatementExecutorConsumer) { ((StatementExecutorConsumer) newInstance).setStatementExecutor(this); } } catch (SlimError e) { throw new SlimException(format("%s[%d]", className, args.length), e, SlimServer.COULD_NOT_INVOKE_CONSTRUCTOR, true); } catch (IllegalArgumentException e) { throw new SlimException(format("%s[%d]", className, args.length), e, SlimServer.COULD_NOT_INVOKE_CONSTRUCTOR, true); } catch (InvocationTargetException e) { checkExceptionForStop(e.getTargetException()); throw new SlimException(e.getTargetException(), true); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }
@Override public void create(String instanceName, String className, Object... args) throws SlimException { try { context.create(instanceName, className, args); // TODO Hack for supporting SlimHelperLibrary, please remove. Object newInstance = context.getInstance(instanceName); if (newInstance instanceof StatementExecutorConsumer) { ((StatementExecutorConsumer) newInstance).setStatementExecutor(this); } } catch (SlimError e) { throw new SlimException(format("%s[%d]", className, args.length), e, SlimServer.COULD_NOT_INVOKE_CONSTRUCTOR, true); } catch (IllegalArgumentException e) { throw new SlimException(format("%s[%d]", className, args.length), e, SlimServer.COULD_NOT_INVOKE_CONSTRUCTOR, true); } catch (InvocationTargetException e) { checkExceptionForStop(e.getTargetException()); throw new SlimException(e.getTargetException(), true); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }
@Override public Object callAndAssign(String variable, String instanceName, String methodName, Object... args) throws SlimException { try { MethodExecutionResult result = getMethodExecutionResult(instanceName, methodName, args); context.setVariable(variable, result); checkForPatternOfFixturesHandlingSymbols(variable); return result.returnValue(); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }
@Override public Object callAndAssign(String variable, String instanceName, String methodName, Object... args) throws SlimException { try { MethodExecutionResult result = getMethodExecutionResult(instanceName, methodName, args); context.setVariable(variable, result); checkForPatternOfFixturesHandlingSymbols(variable); return result.returnValue(); } catch (Throwable e) { // NOSONAR checkExceptionForStop(e); throw new SlimException(e); } }