Package ch.inftec.ju.util

Examples of ch.inftec.ju.util.JuRuntimeException


      }
     
      try {
        return bos.toString("utf-8");
      } catch (Exception ex) {
        throw new JuRuntimeException("Couldn't convert byte array to String", ex);
      }
    }
View Full Code Here


 
  private Class<?> getTestClass() {
    try {
      return Class.forName(this.testClassName);
    } catch (Exception ex) {
      throw new JuRuntimeException("Couldn't get test class. Make sure it's on the classpath: " + this.testClassName);
    }
  }
View Full Code Here

                : "";
           
            logger.debug("Setting system property for test context: {}={}", key, val);
            tempSetter.setProperty(key, val);
          } else {
            throw new JuRuntimeException("SystemProperty String must be of type key=val, but was: %s", keyValStr);
          }
        }
      }
    } catch (Exception ex) {
      // When an exception occurrs, make sure we reset the properties to their original values
View Full Code Here

      url = JuUrl.resource().relativeTo(this.getTestClass()).get(actualResource);
      if (url == null) url = JuUrl.resource(actualResource);
    }
   
    if (url == null) {
      throw new JuRuntimeException(String.format("Couldn't find resource %s, relative to class %s"
          , actualResource
          , this.getTestClass()));
    }
   
    return url;
View Full Code Here

          break;
        }
      }
     
      if (cause != null) {
        throw new JuRuntimeException(causes.toString(), cause);
      } else {
        causes.addLine("Check Server log for more details");
        throw new JuRuntimeException(causes.toString());
      }
    } else {
      throw t;
    }
  }
View Full Code Here

 
  private Class<?> getTestClass() {
    try {
      return Class.forName(this.testClassName);
    } catch (Exception ex) {
      throw new JuRuntimeException("Couldn't get test class. Make sure it's on the classpath: " + this.testClassName);
    }
  }
View Full Code Here

      url = JuUrl.resource().relativeTo(this.getTestClass()).get(actualResource);
      if (url == null) url = JuUrl.resource(actualResource);
    }
   
    if (url == null) {
      throw new JuRuntimeException(String.format("Couldn't find resource %s, relative to class %s"
          , actualResource
          , this.getTestClass()));
    }
   
    return url;
View Full Code Here

      // Use cause (if possible / serializable)
      Throwable cause = IOUtil.isSerializable(t.getCause())
          ? t.getCause()
          : new JuException("Original cause was non-serializable. Check server for details.");
         
      throw new JuRuntimeException("%s (Original Exception %s was non-serializable)", cause, t.getMessage(), t.getClass().getName());
    } else {
      throw t;
    }
  }
View Full Code Here

          }
         
          Liquibase liquibase = new Liquibase(changeLogResourceName, resourceAccessor, db);
          liquibase.update(null);
        } catch (Exception ex) {
          throw new JuRuntimeException("Couldn't run Liquibase change log " + changeLogResourceName, ex);
        }
      }
    });
   
    this.tx.begin(); // Start a new transaction so we won't get problems with EntityManager calls after this method
View Full Code Here

      }
     
      try {
        return bos.toString("utf-8");
      } catch (Exception ex) {
        throw new JuRuntimeException("Couldn't convert byte array to String", ex);
      }
    }
View Full Code Here

TOP

Related Classes of ch.inftec.ju.util.JuRuntimeException

Copyright © 2018 www.massapicom. 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.