snapshotManager.buildSnapshot(mockTable, tableDesc, cubeConfig).getResourcePath(); } catch (IllegalStateException ex) { Assert.assertTrue(ex.getLocalizedMessage().startsWith("Table snapshot should be no greater than 0 MB"));
LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
public static void storeProfile(final ProfileData profile, Context ctx, ProfileData parentProfile) { try { FlowManager.getDatabase(ProfilesDatabase.class).beginTransactionAsync(new ITransaction() { @Override public void execute(DatabaseWrapper databaseWrapper) { profile.save(databaseWrapper); } }).build().execute(); } catch (IllegalStateException e) { if (e.getMessage().contains("connection pool has been closed")) { //reconnect logic try { FlowManager.init(new FlowConfig.Builder(ctx).build()); } catch (Exception de) { Log.i(TAG, "Exception while saving profile data:" + e.getLocalizedMessage()); } } Log.i(TAG, "Exception while saving profile data:" + e.getLocalizedMessage()); } catch (Exception e) { Log.i(TAG, "Exception while saving profile data:" + e.getLocalizedMessage()); } }
buffer.insert(stop, X364.BACKGROUND_DEFAULT).insert(start, ERROR_COLOR); warning = exception.getLocalizedMessage(); value = Double.NaN;
} catch (IllegalStateException e) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
FlowManager.init(new FlowConfig.Builder(context).build()); } catch (Exception de) { Log.i(TAG, "Exception while saving log data:" + e.getLocalizedMessage()); Log.i(TAG, "Exception while saving log data:" + e.getLocalizedMessage()); } catch (Exception e) { Log.i(TAG, "Exception while saving log data:" + e.getLocalizedMessage());
public Object translateValue( Value value ) throws SQLException { if (value == null) return null; try { return this.getTransform().transform(value); } catch (ValueFormatException ve) { throw new SQLException(ve.getLocalizedMessage(), ve); } catch (IllegalStateException ie) { throw new SQLException(ie.getLocalizedMessage(), ie); } catch (RepositoryException e) { throw new SQLException(e.getLocalizedMessage(), e); } }
public Object translateValue( Value value ) throws SQLException { if (value == null) return null; try { return this.getTransform().transform(value); } catch (ValueFormatException ve) { throw new SQLException(ve.getLocalizedMessage(), ve); } catch (IllegalStateException ie) { throw new SQLException(ie.getLocalizedMessage(), ie); } catch (RepositoryException e) { throw new SQLException(e.getLocalizedMessage(), e); } }
private void chainFailure() { try { transactionChain.close(); transactionChain = dataBroker.createTransactionChain(this); clearQueue(); } catch (IllegalStateException e) { LOG.warn(e.getLocalizedMessage()); } }
/** * Set the format to configure. The default implementation accept instance of * {@link DecimalFormat}, {@link SimpleDateFormat} or {@link AngleFormat}. If * more format class are wanted, methods {@link #getPattern} and {@link #setPattern} * should be overridden. * * @param format The format to congifure. * @throws IllegalArgumentException if the format is invalid. */ public void setFormat(final Format format) throws IllegalArgumentException { final Format old = this.format; this.format = format; try { update(); } catch (IllegalStateException exception) { this.format = old; /* * The format is not one of recognized type. Since this format was given in argument * (rather then the internal format field), Change the exception type for consistency * with the usual specification. */ final IllegalArgumentException e; e = new IllegalArgumentException(exception.getLocalizedMessage()); e.initCause(exception); throw e; } firePropertyChange("format", old, format); }
@Override public String getLocalizedMessage() { if(!MockFramework.isEnabled()){ return super.getLocalizedMessage(); } return getDelegate().getLocalizedMessage(); }
public Boolean readBoolean(NodeData parentNode, InternalQName propertyName) throws RepositoryException, NodeTypeReadException { List<ValueData> values = loadPropertyValues(parentNode, propertyName); if (values != null) { if (values.size() == 1) { try { return ValueDataUtil.getBoolean(values.get(0)); } catch (IllegalStateException e) { throw new NodeTypeReadException(e.getLocalizedMessage(), e.getCause()); } } } return new Boolean(false); }
} catch (IllegalStateException ie) { error = true; throw new SQLException(ie.getLocalizedMessage(), ie); } catch (RepositoryException e) { error = true;
private static Set<MessageDestination> readMessageDestinations(File xmlFile, String xPathPrefix, File resourcesDir) { Set<MessageDestination> msgDestinations = new HashSet<MessageDestination>(); if(xmlFile.exists()) { Map<String, AdminObjectResource> aoResourceMap = new HashMap<String, AdminObjectResource>(); List<TreeParser.Path> pathList = new ArrayList<TreeParser.Path>(); pathList.add(new TreeParser.Path(xPathPrefix + "resources/admin-object-resource", new AdminObjectReader(aoResourceMap))); try { TreeParser.readXml(xmlFile, pathList); } catch(IllegalStateException ex) { Logger.getLogger("glassfish-javaee").log(Level.INFO, ex.getLocalizedMessage(), ex); } for(AdminObjectResource adminObj: aoResourceMap.values()) { String type = adminObj.getResType(); if (type.equals(QUEUE)) { msgDestinations.add(new SunMessageDestination(adminObj.getJndiName(), MessageDestination.Type.QUEUE, resourcesDir)); } else { msgDestinations.add(new SunMessageDestination(adminObj.getJndiName(), MessageDestination.Type.TOPIC, resourcesDir)); } } } return msgDestinations; }
public Long readLong(NodeData parentNode, InternalQName propertyName) throws RepositoryException, NodeTypeReadException { List<ValueData> values = loadPropertyValues(parentNode, propertyName); if (values != null) { if (values.size() == 1) { try { return ValueDataUtil.getLong(values.get(0)); } catch (NumberFormatException e) { throw new NodeTypeReadException(e.getLocalizedMessage(), e.getCause()); } catch (IllegalStateException e) { throw new NodeTypeReadException(e.getLocalizedMessage(), e.getCause()); } } } return null; }
TreeParser.readXml(sunResourcesXml, pathList); } catch (IllegalStateException ex) { Logger.getLogger("glassfish-javaee").log(Level.INFO, ex.getLocalizedMessage(), ex); // NOI18N
private Object getCellValue(Cell cell) { if (cell == null) { return null; } try { if (cell.getCellTypeEnum() == CellType.ERROR) { LOGGER.error("Cell content is error. Sheet: {}, row: {}, column: {}", new Object[] { cell.getSheet().getSheetName(), cell.getRowIndex(), cell.getColumnIndex() }); return null; } if (cell.getCellTypeEnum() == CellType.BLANK) { return null; } if (cell.getCellTypeEnum() == CellType.BOOLEAN) { return cell.getBooleanCellValue(); } if (cell.getCellTypeEnum() == CellType.NUMERIC) { return cell.getNumericCellValue(); } if (cell.getCellTypeEnum() == CellType.STRING) { return cell.getStringCellValue(); } } catch (IllegalStateException e) { LOGGER.error(e.getLocalizedMessage()); LOGGER.error("Read cell error. Sheet: {}, row: {}, column: {}", new Object[] { cell.getSheet().getSheetName(), cell.getRowIndex(), cell.getColumnIndex() }); throw new ExcelException(e); } return null; }
throw new Auth0Exception("NoSuchAlgorithmException thrown while decoding JWT token " + e.getLocalizedMessage()); } catch (IllegalStateException e) { throw new Auth0Exception("IllegalStateException thrown while decoding JWT token " + e.getLocalizedMessage()); } catch (SignatureException e) { throw new Auth0Exception("SignatureException thrown while decoding JWT token " + e.getLocalizedMessage());
@Test public void testValidLocaleSettingsPassthrough() throws IOException { try { EmbeddedPostgres.Builder builder = null; if (SystemUtils.IS_OS_WINDOWS) { builder = EmbeddedPostgres.builder() .setLocaleConfig("locale", "en-us") .setLocaleConfig("lc-messages", "en-us"); } else if (SystemUtils.IS_OS_MAC) { builder = EmbeddedPostgres.builder() .setLocaleConfig("locale", "en_US") .setLocaleConfig("lc-messages", "en_US"); } else if (SystemUtils.IS_OS_LINUX){ builder = EmbeddedPostgres.builder() .setLocaleConfig("locale", "en_US.utf8") .setLocaleConfig("lc-messages", "en_US.utf8"); } else { fail("System not detected!"); } builder.start(); } catch (IllegalStateException e){ e.printStackTrace(); fail("Failed to set locale settings: " + e.getLocalizedMessage()); } } }