Examples of ScriptExecutionException


Examples of org.jboss.arquillian.persistence.core.exception.ScriptExecutionException

         statement = connection.createStatement();
         statement.execute(sqlStatement);
      }
      catch (Exception e)
      {
         throw new ScriptExecutionException("Unable to execute statement: " + sqlStatement, e);
      }
      finally
      {
         if (statement != null)
         {
            try
            {
               statement.close();
            }
            catch (SQLException e)
            {
               throw new ScriptExecutionException("Unable to close statement after script execution.", e);
            }
         }
      }
   }
View Full Code Here

Examples of org.openhab.core.scriptengine.ScriptExecutionException

          if(result==null) {
            // this can only happen on an InterpreterCancelledException, i.e. NEVER ;-)
            return null;
          }
          if (result.getException() != null) {
              throw new ScriptExecutionException(result.getException().getMessage(), result.getException());
          }
          return result.getResult();
        } catch(Throwable e) {
          if(e instanceof ScriptExecutionException) {
            throw (ScriptExecutionException) e;
          } else {
            throw new ScriptExecutionException("An error occured during the script execution: " + e.getMessage(), e);
          }
        }
    } else {
          throw new ScriptExecutionException("Script does not contain any expression");
    }
  }
View Full Code Here

Examples of org.openhab.core.scriptengine.ScriptExecutionException

        ScriptEngine scriptEngine = ScriptActivator.scriptEngineTracker.getService();
        if(scriptEngine!=null) {
          Script script = scriptEngine.newScriptFromXExpression(expr);
          return script.execute();
        } else {
          throw new ScriptExecutionException("Script engine is not available.");
        }
      } else {
        throw new ScriptExecutionException("Script '" + scriptName + "' cannot be found.");
      }
    } else {
      throw new ScriptExecutionException("Model repository is not available.");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.