Java 8 BackingStoreException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 BackingStoreException class.

This code example shows how to use the following methods:printStackTrace
        try { 
            prefs.sync();
        } 
        catch (BackingStoreException e) {
            System.err.println("Couldn't access Preferences in StartupCrash");
            e.printStackTrace();
        } 
        // Just let startup continue; maybe we'll get lucky. 
    } 
 
    static void startupEnded() { 
        Preferences prefs = Preferences.userRoot().node("/com/lightcrafts/app");
        prefs.putBoolean(StartupKey, true);
    } 
 
    static void checkLastStartupSuccessful() { 
        Preferences prefs = Preferences.userRoot().node("/com/lightcrafts/app");
        boolean wasSuccessful = prefs.getBoolean(StartupKey, true);
        if (! wasSuccessful) {
            JButton help = new JButton(LOCALE.get("StartupErrorHelpOption"));
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
    private static void syncPrefs() { 
        try { 
            m_prefs.sync();
        } 
        catch ( BackingStoreException e ) {
            e.printStackTrace();
        } 
    } 
 
    /** 
     * User preferences for checking for updates. 
     */ 
    private static final Preferences m_prefs;
 
    /** 
     * The subversion revision number of the update. 
     */ 
    private static int m_updateRevision;
 
    /** 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            } 
          } 
          catch (final Exception e)
          { 
            UncaughtExceptionsModel.getInstance().addException(e);
            throw new BackingStoreException("Failed to write config " + target); //$NON-NLS-1$
          } 
        } 
      } 
    } 
  } 
 
  protected void flushSpi() throws BackingStoreException 
  { 
    // no-op 
    syncSpi(); 
  } 
 
 
  protected void removeNodeSpi() throws BackingStoreException 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
        { 
            return childrenNames(); 
        } catch (BackingStoreException e)
        { 
            // TODO Auto-generated catch block 
            e.printStackTrace();
            throw new RuntimeException("Unimplemented exception.");
        } 
    } 
 
    public void addFile(String fileName)
    { 
        node(fileName);
    } 
 
    public String getNote(String file)
    { 
        return node(file).get("note", null);
    } 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
preferences.flush();
    } 
    catch (BackingStoreException e)
    { 
      e.printStackTrace();
    } 
  } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
        model.getVehiclePositionsUrl());
    updatePreferences(preferences, "alertsUrl", model.getAlertsUrl());
    try { 
      preferences.sync();
    } catch (BackingStoreException e) {
      e.printStackTrace();
    } 
  } 
 
  private static void updatePreferences(Preferences preferences,
      String property, String value) {
    if (value == null)
      preferences.remove(property);
    else 
      preferences.put(property, value);
  } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private void checkException() throws BackingStoreException { 
        switch (result) {
        case NORMAL:
            return; 
        case backingException:
            throw new BackingStoreException("test");
        case runtimeException:
            throw new MockRuntimeException("test"); 
        } 
    } 
 
    public AbstractPreferences publicChildSpi(String name) {
        return childSpi(name);
    } 
 
    @Override 
    public AbstractPreferences childSpi(String name) {
        try { 
            checkException(); 
        } catch (BackingStoreException e) {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
prefs.flush ();
        } 
        catch (BackingStoreException bse)
        { 
            bse.printStackTrace ();
        } 
    } 
 
    /** 
     * Sets the frame size if no previous preference has been stored. 
     * It creates a window covering all but <code>BORDERPERCENT</code> 
     * margins. 
     */ 
    public void initSize () 
    { 
        Toolkit tk;
        Dimension dim;
        int borderx;
        int bordery;
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		System.out.println("Save int Data : " + key);
		try { 
			prefs.putInt(key, data);
			prefs.flush();
		} catch (BackingStoreException e) {
			e.printStackTrace();
		} 
	} 
 
	public int intLoad(String key, int def) {
		System.out.println("Get int Data :" + key);
		System.out.println("return getInt() :" + prefs.getInt(key, def));
		return prefs.getInt(key, def);
	} 
 
	public Preferences getPrefs() {
		return this.prefs;
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:toString
     */ 
    public void flushPreferences() { 
        try { 
            userPrefs.flush();
        } catch (BackingStoreException e) {
            log.error(e.toString()); // slf4j migration: toString()
        } 
    } 
 
    // ////////////// [General] Section //////////////// 
 
    /** 
     * Returns the level of debugging which should be set on {@link ImportConfig} 
     * Any value lower than null will not call configureDebug. 
     */ 
    public int getDebugLevel() { 
    	if (userPrefs == null) return -1;
        return userPrefs.node("General").getInt("debug", -1);
    } 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 BackingStoreException Methods: