Tabnine Logo
RuntimeException.getLocalizedMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocalizedMessage
method
in
java.lang.RuntimeException

Best Java code snippets using java.lang.RuntimeException.getLocalizedMessage (Showing top 20 results out of 1,143)

origin: plutext/docx4j

/** @inheritDoc */
public String toString() {
  String s = this.getClass().getName();
  String message = super.getLocalizedMessage();
  if (message != null) {
    message = s + ": " + message;
  } else {
    message = s;
  }
  if (this.getCause() != null) {
    message = message + "\nOriginal Exception was " + this.getCause().toString();
  }
  return message;
}
origin: apache/flume

/**
 * Rollback the transaction. If there is a RuntimeException during rollback,
 * it will be logged but the transaction instance variable will still be
 * nullified.
 */
private void rollbackTransaction() {
 if (transaction != null) {
  try {
   // If the transaction wasn't committed before we got the exception, we
   // need to rollback.
   transaction.rollback();
  } catch (RuntimeException ex) {
   LOG.error("Transaction rollback failed: " + ex.getLocalizedMessage());
   LOG.debug("Exception follows.", ex);
  } finally {
   transaction.close();
   this.transaction = null;
  }
 }
}
origin: apache/geode

private static GemFireCacheImpl basicCreate(InternalDistributedSystem system, boolean existingOk,
  CacheConfig cacheConfig, PoolFactory pf, boolean isClient, boolean asyncEventListeners,
  TypeRegistry typeRegistry) throws CacheExistsException, TimeoutException,
  CacheWriterException, GatewayException, RegionExistsException {
 try {
  synchronized (GemFireCacheImpl.class) {
   GemFireCacheImpl instance = checkExistingCache(existingOk, cacheConfig, system);
   if (instance == null) {
    instance = new GemFireCacheImpl(isClient, pf, system, cacheConfig, asyncEventListeners,
      typeRegistry);
    system.setCache(instance);
    instance.initialize();
   } else {
    system.setCache(instance);
   }
   return instance;
  }
 } catch (CacheXmlException | IllegalArgumentException e) {
  logger.error(e.getLocalizedMessage()); // TODO: log the full stack trace or not?
  throw e;
 } catch (Error | RuntimeException e) {
  logger.error(e);
  throw e;
 }
}
origin: jMonkeyEngine/jmonkeyengine

  result.setKey(key);
} catch (AssetNotFoundException | AssetLoadException e) {
  LOGGER.fine(e.getLocalizedMessage());
    LOGGER.fine(e.getLocalizedMessage());
  assetManager.loadTexture(key);
} catch (AssetNotFoundException | AssetLoadException e) {
  LOGGER.fine(e.getLocalizedMessage());
origin: apache/activemq

RuntimeException exception = new RuntimeException(
    "Failed to start temp data store: " + tempDataStore, e);
LOG.error(exception.getLocalizedMessage(), e);
throw exception;
RuntimeException exception = new RuntimeException(
    "Failed to start job scheduler store: " + jobSchedulerStore, e);
LOG.error(exception.getLocalizedMessage(), e);
throw exception;
origin: wildfly/wildfly

@Override
public void undeploy(DeploymentUnit deploymentUnit) {
  if (deploymentUnit.getParent() != null && deploymentUnit.getParent().getParent() != null) {
    // We only expose management resources 2 levels deep
    return;
  }
  // Iterate through each component, uninstalling it
  for (final InstalledComponent configuration : deploymentUnit.getAttachmentList(EjbDeploymentAttachmentKeys.MANAGED_COMPONENTS)) {
    try {
      uninstallManagementResource(configuration, deploymentUnit);
    } catch (RuntimeException e) {
      EjbLogger.DEPLOYMENT_LOGGER.failedToRemoveManagementResources(configuration, e.getLocalizedMessage());
    }
  }
  deploymentUnit.removeAttachment(EjbDeploymentAttachmentKeys.MANAGED_COMPONENTS);
}
origin: ankidroid/Anki-Android

  data.result = new Object[] {"UserAbortedSync" };
mediaError = AnkiDroidApp.getAppResources().getString(R.string.sync_media_error) + "\n\n" + e.getLocalizedMessage();
origin: apache/activemq

} catch (IOException error) {
  RuntimeException runtimeException = new RuntimeException("Failed to persist JMSRedeliveryFlag on " + message.getMessageId() + " in " + message.getDestination(), error);
  LOG.warn(runtimeException.getLocalizedMessage(), runtimeException);
  throw runtimeException;
} finally {
origin: aws-amplify/aws-sdk-android

} catch (RuntimeException e) {
  Log.d(TAG, "Cannot initialize Amazon Mobile Analytics SDK", e);
  throw new InitializationException(e.getLocalizedMessage());
origin: org.apache.openwebbeans/openwebbeans-impl

@Override
public String getLocalizedMessage()
{
  return msg.getAdditionalInformation(super.getLocalizedMessage());
}
origin: org.hibernate/hibernate-search-elasticsearch

private String parseJsonString(String name, String value) {
  try {
    /*
     * Use getAsJsonPrimitive() first in order to throw an exception
     * if the element is an array, number, or other
     */
    return jsonParser.parse( value ).getAsJsonPrimitive().getAsString();
  }
  catch (JsonParseException | ClassCastException | IllegalStateException e) {
    throw LOG.invalidAnalysisDefinitionJsonStringParameter( factoryClass, name, e.getLocalizedMessage(), e );
  }
}
origin: hibernate/hibernate-search

private String parseJsonString(String name, String value) {
  try {
    /*
     * Use getAsJsonPrimitive() first in order to throw an exception
     * if the element is an array, number, or other
     */
    return jsonParser.parse( value ).getAsJsonPrimitive().getAsString();
  }
  catch (JsonParseException | ClassCastException | IllegalStateException e) {
    throw LOG.invalidAnalysisDefinitionJsonStringParameter( factoryClass, name, e.getLocalizedMessage(), e );
  }
}
origin: aws-amplify/aws-sdk-android

} catch (RuntimeException e) {
  Log.d(TAG, "Cannot initialize Amazon Mobile Analytics SDK", e);
  throw new InitializationException(e.getLocalizedMessage());
origin: org.jresearch.flexess.core/org.jresearch.flexess.core.impl

@Override
public IUser getUser(final String userId) throws UmiException {
  try {
    return umiUserManager.getUser(userId);
  } catch (final RuntimeException e) {
    final String message = MessageFormat.format("Can''t get user {0}: {1}. See server logs for detailed information.", userId, e.getLocalizedMessage()); //$NON-NLS-1$
    logger.error(message, e);
    throw new UmiException(e, message);
  }
}
origin: org.eclipse.che.core/che-core-api-workspace

@Override
public void remove(String id) throws ServerException {
 requireNonNull(id, "Required non-null id");
 try {
  doRemove(id);
 } catch (RuntimeException x) {
  throw new ServerException(x.getLocalizedMessage(), x);
 }
}
origin: org.eclipse.che.multiuser/che-multiuser-permission-workspace

@Override
public void remove(String id) throws ServerException {
 requireNonNull(id, "Required non-null id");
 try {
  doRemove(id);
 } catch (RuntimeException x) {
  throw new ServerException(x.getLocalizedMessage(), x);
 }
}
origin: aws-amplify/aws-sdk-android

} catch (final RuntimeException e) {
  log.debug("Cannot initialize Pinpoint SDK", e);
  throw new AmazonClientException(e.getLocalizedMessage());
origin: org.randombits.confluence/confluence-intercom

private void notifyRemovedLocalBundle( ConnectionBundle bundle ) {
  // Notify listeners
  notifyRemovedConnectionBundle( bundle );
  // Notify remote intercoms
  for ( Intercom4 intercom : getRemoteIntercoms() ) {
    try {
      intercom.removeRemoteBundle( bundle );
    } catch ( RuntimeException e ) {
      LOG.error( "Unexpected exception: " + e.getLocalizedMessage(), e );
    }
  }
}
origin: org.eclipse.che.multiuser/che-multiuser-permission-workspace

@Override
public void remove(String id) throws ServerException {
 requireNonNull(id, "Required non-null id");
 try {
  Optional<WorkspaceImpl> workspaceOpt = doRemove(id);
  workspaceOpt.ifPresent(
    workspace -> eventService.publish(new WorkspaceRemovedEvent(workspace)));
 } catch (RuntimeException x) {
  throw new ServerException(x.getLocalizedMessage(), x);
 }
}
origin: EvoSuite/evosuite

@Override
public String getLocalizedMessage() {		
  if(!MockFramework.isEnabled()){
    return super.getLocalizedMessage();
  }        
  return getDelegate().getLocalizedMessage();
}
java.langRuntimeExceptiongetLocalizedMessage

Popular methods of RuntimeException

  • <init>
  • getMessage
  • printStackTrace
  • getCause
  • toString
  • getStackTrace
  • initCause
  • setStackTrace
  • fillInStackTrace
  • addSuppressed
  • getSuppressed
  • getSuppressed

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • JPanel (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now