Package kameleon.exception

Examples of kameleon.exception.KameleonException


              State.INFORMATION,
              ADD_FILE_ERROR,
              currentFile.getAbsolutePath()) ;
          this.model.addMessage(imsg) ;
          this.model.displayDebugInformation(
              new KameleonException(imsg.getMessage(), ex)) ;
        } catch (UnknownKeyException e) {
          //TODO Review
          /* This should not happen. */
        } catch (NullPointerException npe) {
          //TODO Review
View Full Code Here


          new File(LANGUAGE_FOLDER).toURI().toURL()} ;
      instance = new SwitchLanguage(LANGUAGE_FILE_NAME,
          new URLClassLoader(urls)) ;
    } catch (MalformedURLException e) {
      //TODO Add exception ?
      throw new KameleonException(
          "Error while initializing SwitchLanguage", //$NON-NLS-1$
          e) ;
    }// try
  }// initialize()
View Full Code Here

   * @throws  KameleonException
   *       If the number of arugments is incorrect
   */
  protected static void checkArgs(String[] args) throws KameleonException {
    if (args.length != 3) {
      throw new KameleonException(
          String.format("Nombre d'arguments incorrect, %d trouves, %d attendus.\n",
              args.length, 3)) ;
    }// if
  }// checkArgs(String[])
View Full Code Here

        IOFile.copyFile(src, dest) ;
        src.close() ;
        dest.close() ;
      } catch (FileNotFoundException e) {
        //TODO Handle exception
        throw new KameleonException(e.getMessage()) ;
      } catch (IOException e) {
        throw new KameleonException(e.getMessage()) ;
      }// try
    }// for
  }
View Full Code Here

    try {
      //System.out.println("File : "+f.getAbsolutePath());
      writer = new PrintWriter(f, "UTF-8");
    } catch (IOException ex) {
      //TODO Add our exception
      throw new KameleonException(ex.getMessage()) ;
    }
  }
View Full Code Here

    this.generateFormats = true ;
    try {
      this.pw = new PrintWriter(f, FILE_CHARSET) ;
    } catch (Exception ex) {
      //TODO ajouter une exception à nous
      throw new KameleonException(ex.getMessage()) ;
    }// try
  }// Generator(File, Document)
View Full Code Here

   *       If the number of arugments is incorrect
   */
  protected static void checkArgs(String[] args) throws KameleonException {
    int nExpectedParamters = 4 ;
    if (args.length != nExpectedParamters) {
      throw new KameleonException(//TODO Translate error message
          String.format("Nombre d'arguments incorrect, %d trouves, %d attendus.\n",
              args.length, nExpectedParamters)) ;
    }// if
  }// checkArgs(String[])
View Full Code Here

          new LexicalAnalyzer(new InputStreamReader(
              new FileInputStream(analyzedFile), "UTF-8"))) ;
      return (Document) a.parse().value ;
    } catch (FileNotFoundException e) {
      //TODO Ajouter notre exception
      throw new KameleonException(e.getMessage()) ;
    } catch (Exception e) {
      //TODO Ajouter notre exception
      throw new KameleonException(e.getMessage()) ;
    }// try
  }// analyzeFile(String)
View Full Code Here

        IOFile.copyFile(src, dest) ;
        src.close() ;
        dest.close() ;
      } catch (FileNotFoundException e) {
        //TODO Handle exception
        throw new KameleonException(e.getMessage()) ;
      } catch (IOException e) {
        throw new KameleonException(e.getMessage()) ;
      }// try
    }// for
  }
View Full Code Here

          new LexicalAnalyzer(new InputStreamReader(
              new FileInputStream(filePath), charset)));
      Symbol result = a.parse() ;
      return (Document) result.value ;
    } catch (UnsupportedEncodingException e) {
      throw new KameleonException(e.getMessage()) ;
    } catch (FileNotFoundException e) {
      throw new KameleonException(e.getMessage()) ;
    } catch (Exception e) {
      throw new KameleonException(e.getMessage()) ;
    }// try
  }
View Full Code Here

TOP

Related Classes of kameleon.exception.KameleonException

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.