Examples of UtilException


Examples of ag.ion.bion.officelayer.util.UtilException

        if(newKey == allFormats[i].getFormatKey())
          return allFormats[i];
      }
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
    throw new UtilException("The number format is not available.");
  }
View Full Code Here

Examples of ag.ion.bion.officelayer.util.UtilException

        formats.add(new NumberFormat(key,xProp,this));
      }
      return formats.toArray(new INumberFormat[formats.size()]);
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

Examples of ag.ion.bion.officelayer.util.UtilException

  public double convertStringToNumber(int key, String text) throws UtilException {
    try {
      if(xNumberFormatter == null) {
        IServiceProvider serviceProvider = textDocument.getServiceProvider();
        if(serviceProvider == null)
          throw new UtilException("No service provider available in document.");
        Object formatter = serviceProvider.createServiceWithContext("com.sun.star.util.NumberFormatter");
        xNumberFormatter = (XNumberFormatter)UnoRuntime.queryInterface(XNumberFormatter.class, formatter);
        xNumberFormatter.attachNumberFormatsSupplier(xNumberFormatsSupplier);    
      }
      return xNumberFormatter.convertStringToNumber(key,text);
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

Examples of ag.ion.bion.officelayer.util.UtilException

  public String convertNumberToString(int key, double number) throws UtilException {
    try {
      if(xNumberFormatter == null) {
        IServiceProvider serviceProvider = textDocument.getServiceProvider();
        if(serviceProvider == null)
          throw new UtilException("No service provider available in document.");
        Object formatter = serviceProvider.createServiceWithContext("com.sun.star.util.NumberFormatter");
        xNumberFormatter = (XNumberFormatter)UnoRuntime.queryInterface(XNumberFormatter.class, formatter);
        xNumberFormatter.attachNumberFormatsSupplier(xNumberFormatsSupplier);    
      }
      return xNumberFormatter.convertNumberToString(key,number);
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

Examples of com.sun.xml.internal.ws.util.UtilException

    private static Class loadClass(ClassLoader loader, String name) {
        try {
            return Class.forName(name, true, loader);
        } catch (ClassNotFoundException e) {
            throw new UtilException(
                    "util.handler.class.not.found",
                    name);
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.util.UtilException

        }
    }

    private static void failWithLocalName(String key,
            XMLStreamReader reader, String arg) {
        throw new UtilException(key,
            Integer.toString(reader.getLocation().getLineNumber()),
            reader.getLocalName(),
            arg );
    }
View Full Code Here

Examples of com.sun.xml.ws.util.UtilException

    private static Class loadClass(ClassLoader loader, String name) {
        try {
            return Class.forName(name, true, loader);
        } catch (ClassNotFoundException e) {
            throw new UtilException(
                    "util.handler.class.not.found",
                    name);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.util.UtilException

        }
    }

    private static void failWithLocalName(String key,
            XMLStreamReader reader, String arg) {
        throw new UtilException(key,
            Integer.toString(reader.getLocation().getLineNumber()),
            reader.getLocalName(),
            arg );
    }
View Full Code Here

Examples of com.xiaoleilu.hutool.exceptions.UtilException

   */
  public static void execute(Runnable runnable) {
    try {
      executor.execute(runnable);
    } catch (Exception e) {
      throw new UtilException("Exception when running task!", e);
    }
  }
View Full Code Here

Examples of com.xiaoleilu.hutool.exceptions.UtilException

   */
  public static DateTime parse(String dateStr, SimpleDateFormat simpleDateFormat) {
    try {
      return new DateTime(simpleDateFormat.parse(dateStr));
    } catch (Exception e) {
      throw new UtilException(StrUtil.format("Parse [{}] with format [{}] error!", dateStr, simpleDateFormat.toPattern()), e);
    }
  }
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.