Package au.net.causal.projo.prefs

Examples of au.net.causal.projo.prefs.PreferencesException


      }
    }
   
    //If we get here, no date formats worked
    //Propogate cause if only one format exists
    PreferencesException ex = new PreferencesException("Error parsing date '" + s + "'.");
    if (dateFormats.size() == 1)
      ex.initCause(lastParseError);
   
    throw ex;
  }
View Full Code Here


    {
      return(new BigInteger(s));
    }
    catch (NumberFormatException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to an integer.", e);
    }
  }
View Full Code Here

    {
      return(Float.valueOf(s));
    }
    catch (NumberFormatException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to a decimal number.", e);
    }
  }
View Full Code Here

    {
      log.debug("Not in hex form: " + s, e);
    }
   
    //If we get here we could not interpret as color
    throw new PreferencesException("Failed to parse '" + s + "' as a Color.");
  }
View Full Code Here

    {
      return(new URI(s));
    }
    catch (URISyntaxException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to a URI.", e);
    }
  }
View Full Code Here

    {
      return(encoding.decode(s));
    }
    catch (IllegalArgumentException e)
    {
      throw new PreferencesException("Failed to decode base64 value '" + s + "'.", e);
    }
  }
View Full Code Here

    {
      return(Double.valueOf(s));
    }
    catch (NumberFormatException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to a decimal number.", e);
    }
  }
View Full Code Here

    {
      return(UUID.fromString(s));
    }
    catch (IllegalArgumentException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to an integer.", e);
    }
  }
View Full Code Here

    {
      return(Long.valueOf(s));
    }
    catch (NumberFormatException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to a long.", e);
    }
  }
View Full Code Here

       
        return(list);
      }
      catch (NoSuchMethodException | IllegalAccessException | InstantiationException e)
      {
        throw new PreferencesException("Cannot instantiate list of type " + listType + ".", e);
      }
      catch (InvocationTargetException e)
      {
        if (e.getCause() instanceof RuntimeException)
          throw ((RuntimeException)e.getCause());
        else if (e.getCause() instanceof Error)
          throw ((Error)e.getCause());
        else if (e.getCause() instanceof PreferencesException)
          throw ((PreferencesException)e.getCause());
        else
          throw new PreferencesException("Cannot instantiate list of type " + listType + ".", e.getCause());
      }
    }
    else
      throw new PreferencesException("Cannot instantiate list of type " + listType + " since it cannot be instantiated.");
  }
View Full Code Here

TOP

Related Classes of au.net.causal.projo.prefs.PreferencesException

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.