Package com.dbdeploy.exceptions

Examples of com.dbdeploy.exceptions.UsageException


    checkForRequiredParameter(driver, "driver");
    checkForRequiredParameter(url, "url");
    checkForRequiredParameter(scriptdirectory, "dir");

    if (scriptdirectory == null || !scriptdirectory.isDirectory()) {
      throw new UsageException("Script directory must point to a valid directory");
    }
  }
View Full Code Here


        template.process(model, writer);
      } finally {
        writer.close();
      }
    } catch (FileNotFoundException ex) {
      throw new UsageException("Could not find template named " + filename + "\n" +
          "Check that you have got the name of the database syntax correct.", ex);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

        return createScript();
    }

    private void validate() {
        if (scriptDirectory == null || !scriptDirectory.isDirectory()) {
            throw new UsageException("Script directory must point to a valid directory");
        }
    }
View Full Code Here

            if (commandLine.hasOption("password") && commandLine.getOptionValue("password") == null) {
                dbDeploy.setPassword(userInputReader.read("Password"));
            }
    } catch (ParseException e) {
      throw new UsageException(e.getMessage(), e);
    }
  }
View Full Code Here

    checkForRequiredParameter(driver, "driver");
    checkForRequiredParameter(url, "url");
    checkForRequiredParameter(scriptdirectory, "dir");

    if (scriptdirectory == null || !scriptdirectory.isDirectory()) {
      throw new UsageException("Script directory must point to a valid directory");
    }
  }
View Full Code Here

        template.process(model, writer);
      } finally {
        writer.close();
      }
    } catch (FileNotFoundException ex) {
      throw new UsageException("Could not find template named " + filename + "\n" +
          "Check that you have got the name of the database syntax correct.", ex);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.dbdeploy.exceptions.UsageException

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.