} catch (UnsupportedOperationException e){ errOut.println("Failover command is not supported with " + "auto-failover enabled: " + e.getLocalizedMessage()); return -1;
System.out.println("Formats for " + ma + " and " + type + ": " + Arrays.toString(clContext.querySupportedFormats(ma, type))); } catch (UnsupportedOperationException e) { LOG.warning(e.getLocalizedMessage());
/** * @param sb * @param o */ public void eval( StringBuilder sb, Object o ) { if ( o instanceof Property ) { try { sb.append( ( (Property) o ).getValue() ); } catch ( UnsupportedOperationException e ) { LOG.error( "The error '{}' occurred while converting a property to a string, " + "probably the WKT writer cannot convert a geometry.", e.getLocalizedMessage() ); LOG.debug( "Stack trace:", e ); } } else { LOG.warn( "Trying to get value while current object is a feature." ); } }
protected void logUnsupportedOp( UnsupportedOperationException exception, String context ) { Logger logger = getLogger(); if( logger != null ) { String logMsg = exception.getLocalizedMessage(); if ( logMsg == null || logMsg.length() == 0 ) logMsg = context; else logMsg = context + ": " + logMsg; //$NON-NLS-1$ logger.warning( logMsg ); } }
protected void handleUnsupportedOp( UnsupportedOperationException exception, String context ) { // want to log the old exception because our new exception will have // a different stack trace than the old one and the user will want // to see the old stack trace in the logs. Logger logger = getLogger(); if( logger != null ) logger.severe( exception ); // we'll have to reconstruct a new exception object if the // existing exception doesn't have a message because the // Exception class has no setters for message. String exceptionMsg = exception.getLocalizedMessage(); exception = ( exceptionMsg == null || exceptionMsg.length() == 0 ) ? new UnsupportedOperationException( context ) : exception; throw exception; }
} catch ( UnsupportedOperationException e ) { LOG.error( "The error '{}' occurred while converting a property to a string, " + "probably the WKT writer cannot convert a geometry.", e.getLocalizedMessage() ); LOG.debug( "Stack trace:", e );
private void setIdentifiedObject(final IdentifiedObject item) { String text; try { text = item.toWKT(); } catch (UnsupportedOperationException e) { text = e.getLocalizedMessage(); if (text == null) { text = Classes.getShortClassName(e); } final String lineSeparator = System.getProperty("line.separator", "\n"); if (e instanceof UnformattableObjectException) { text = Vocabulary.format(VocabularyKeys.WARNING) + ": " + text + lineSeparator + lineSeparator + item + lineSeparator; } else { text = Vocabulary.format(VocabularyKeys.ERROR) + ": " + text + lineSeparator; } } wktArea.setText(text); }
private void setIdentifiedObject(final IdentifiedObject item) { String text; try { text = item.toWKT(); } catch (UnsupportedOperationException e) { text = e.getLocalizedMessage(); if (text == null) { text = Classes.getShortClassName(e); } final String lineSeparator = System.getProperty("line.separator", "\n"); if (e instanceof UnformattableObjectException) { text = Vocabulary.format(VocabularyKeys.WARNING) + ": " + text + lineSeparator + lineSeparator + item + lineSeparator; } else { text = Vocabulary.format(VocabularyKeys.ERROR) + ": " + text + lineSeparator; } } wktArea.setText(text); }
/** * Sets the object to display in this property sheet. * * @param item The object to display info about. */ public void setIdentifiedObject(final IdentifiedObject item) { String text; try { text = item.toWKT(); } catch (UnsupportedOperationException e) { text = e.getLocalizedMessage(); if (text == null) { text = Utilities.getShortClassName(e); } final String lineSeparator = System.getProperty("line.separator", "\n"); if (e instanceof UnformattableObjectException) { text = Vocabulary.format(VocabularyKeys.WARNING) + ": " + text + lineSeparator + lineSeparator + item + lineSeparator; } else { text = Vocabulary.format(VocabularyKeys.ERROR) + ": " + text + lineSeparator; } } wktArea.setText(text); }
private void setIdentifiedObject(final IdentifiedObject item) { String text = ""; try { if (item != null) { text = item.toWKT(); } } catch (UnsupportedOperationException e) { text = e.getLocalizedMessage(); if (text == null) { text = Classes.getShortClassName(e); } final String lineSeparator = System.getProperty("line.separator", "\n"); if (e instanceof UnformattableObjectException) { text = Vocabulary.format(VocabularyKeys.WARNING) + ": " + text + lineSeparator + lineSeparator + item + lineSeparator; } else { text = Vocabulary.format(VocabularyKeys.ERROR) + ": " + text + lineSeparator; } } wktArea.setText(text); }
debugger.fixClasses(map); } catch (UnsupportedOperationException uoex) { error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_FixUnsupported", uoex.getLocalizedMessage()); } catch (NoClassDefFoundError ncdfex) { error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_FixMismatch", ncdfex.getLocalizedMessage());
public IRubyObject initialize(ThreadContext context, ProtocolFamily family) { Ruby runtime = context.runtime; try { this.family = family; DatagramChannel channel = DatagramChannel.open(family); initSocket(newChannelFD(runtime, channel)); } catch (ConnectException e) { throw runtime.newErrnoECONNREFUSEDError(); } catch (UnknownHostException e) { throw SocketUtils.sockerr(runtime, "initialize: name or service not known"); } catch (UnsupportedOperationException uoe) { if (uoe.getMessage().contains("IPv6 not available")) { throw runtime.newErrnoEAFNOSUPPORTError("socket(2) - udp"); } throw sockerr(runtime, "UnsupportedOperationException: " + uoe.getLocalizedMessage(), uoe); } catch (IOException e) { throw sockerr(runtime, "initialize: name or service not known", e); } return this; }
public IRubyObject initialize(ThreadContext context, ProtocolFamily family) { Ruby runtime = context.runtime; try { this.family = family; DatagramChannel channel = DatagramChannel.open(family); initSocket(newChannelFD(runtime, channel)); } catch (ConnectException e) { throw runtime.newErrnoECONNREFUSEDError(); } catch (UnknownHostException e) { throw SocketUtils.sockerr(runtime, "initialize: name or service not known"); } catch (UnsupportedOperationException uoe) { if (uoe.getMessage().contains("IPv6 not available")) { throw runtime.newErrnoEAFNOSUPPORTError("socket(2) - udp"); } throw sockerr(runtime, "UnsupportedOperationException: " + uoe.getLocalizedMessage(), uoe); } catch (IOException e) { throw sockerr(runtime, "initialize: name or service not known", e); } return this; }
} catch (UnsupportedOperationException e){ errOut.println("Failover command is not supported with " + "auto-failover enabled: " + e.getLocalizedMessage()); return -1;
} catch (UnsupportedOperationException e){ errOut.println("Failover command is not supported with " + "auto-failover enabled: " + e.getLocalizedMessage()); return -1;
} catch (UnsupportedOperationException e){ errOut.println("Failover command is not supported with " + "auto-failover enabled: " + e.getLocalizedMessage()); return -1;
debugger.fixClasses (map); } catch (UnsupportedOperationException uoex) { error = "The virtual machine does not support this operation: "+uoex.getLocalizedMessage(); } catch (NoClassDefFoundError ncdfex) { error = "The bytes don't correspond to the class type (the names don't match): "+ncdfex.getLocalizedMessage();
} catch (UnsupportedOperationException e){ errOut.println("Failover command is not supported with " + "auto-failover enabled: " + e.getLocalizedMessage()); return -1;