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

How to use
getLocalizedMessage
method
in
java.lang.Exception

Best Java code snippets using java.lang.Exception.getLocalizedMessage (Showing top 20 results out of 11,754)

origin: javaee-samples/javaee7-samples

  @Override
  public void onReadError(Exception ex) throws Exception {
    BatchListenerRecorder.batchListenersCountDownLatch.countDown();
    System.out.println("MyItemReadListener.onReadError: " + ex.getLocalizedMessage());
  }
}
origin: javaee-samples/javaee7-samples

  @Override
  public void onProcessError(Object item, Exception ex) throws Exception {
    BatchListenerRecorder.batchListenersCountDownLatch.countDown();
    System.out.println("MyItemProcessorListener.onProcessError: " + item + ", " + ex.getLocalizedMessage());
  }
}
origin: javaee-samples/javaee7-samples

  @Override
  public void onWriteError(List items, Exception ex) throws Exception {
    BatchListenerRecorder.batchListenersCountDownLatch.countDown();
    System.out.println("MyItemWriteListener.onError: " + items + ", " + ex.getLocalizedMessage());
  }
}
origin: pentaho/pentaho-kettle

@Override
public void update( ChangedFlagInterface o, Object arg ) {
 try {
  Method m = getClass().getMethod( arg.toString() );
  if ( m != null ) {
   m.invoke( this );
  }
 } catch ( Exception e ) {
  // ignore... let the other notifiers try to do something
  System.out.println( "Unable to update: " + e.getLocalizedMessage() );
 }
}
origin: redisson/redisson

/**
 * This method should be overridden for TypeDescription implementations that are supposed to implement
 * instantiation logic that is different from default one as implemented in YAML constructors.
 * Note that even if you override this method, default filling of fields with
 * variables from parsed YAML will still occur later.
 * @param node - node to construct the instance from
 * @return new instance
 */
public Object newInstance(Node node) {
  if (impl != null) {
    try {
      java.lang.reflect.Constructor<?> c = impl.getDeclaredConstructor();
      c.setAccessible(true);
      return c.newInstance();
    } catch (Exception e) {
      log.fine(e.getLocalizedMessage());
      impl = null;
    }
  }
  return null;
}
origin: pentaho/pentaho-kettle

public static KeyPair generateKeyPair() {
 KeyPair pair = null;
 try {
  KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance( PUBLIC_KEY_ALGORITHM );
  keyPairGen.initialize( KEY_SIZE );
  pair = keyPairGen.generateKeyPair();
 } catch ( Exception ex ) {
  log.logError( ex.getLocalizedMessage(), ex );
 }
 return pair;
}
origin: pentaho/pentaho-kettle

 public static byte[] decryptUsingKey( byte[] data, Key key ) {
  byte[] result = null;
  try {
   Cipher cipher = Cipher.getInstance( PUBLIC_KEY_ALGORITHM );
   cipher.init( Cipher.DECRYPT_MODE, key );
   result = cipher.doFinal( data );
  } catch ( Exception ex ) {
   log.logError( ex.getLocalizedMessage(), ex );
  }
  return result;
 }
}
origin: pentaho/pentaho-kettle

public static byte[] encryptUsingKey( byte[] data, Key key ) {
 byte[] result = null;
 try {
  Cipher cipher = Cipher.getInstance( PUBLIC_KEY_ALGORITHM );
  cipher.init( Cipher.ENCRYPT_MODE, key );
  result = cipher.doFinal( data );
 } catch ( Exception ex ) {
  log.logError( ex.getLocalizedMessage(), ex );
 }
 return result;
}
origin: pentaho/pentaho-kettle

public static void addExceptionRemark( CheckResultSourceInterface source, String propertyName,
 String validatorName, List<CheckResultInterface> remarks, Exception e ) {
 String key = "messages.failed.unableToValidate";
 remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, ValidatorMessages.getString(
  key, propertyName, e.getClass().getSimpleName() + ": " + e.getLocalizedMessage() ), source ) );
}
origin: jersey/jersey

@SuppressWarnings("unchecked")
@Override
public T next() {
  final Class<T> nextClass = (Class<T>) it.next();
  try {
    return nextClass.newInstance();
  } catch (final Exception ex) {
    final ServiceConfigurationError sce = new ServiceConfigurationError(serviceName + ": "
        + LocalizationMessages.PROVIDER_COULD_NOT_BE_CREATED(
        nextClass.getName(), serviceClass, ex.getLocalizedMessage()));
    sce.initCause(ex);
    throw sce;
  }
}
origin: jersey/jersey

@SuppressWarnings("unchecked")
@Override
public T next() {
  final Class<T> nextClass = (Class<T>) it.next();
  try {
    return nextClass.newInstance();
  } catch (final Exception ex) {
    final ServiceConfigurationError sce = new ServiceConfigurationError(serviceName + ": "
        + LocalizationMessages.PROVIDER_COULD_NOT_BE_CREATED(
        nextClass.getName(), serviceClass, ex.getLocalizedMessage()));
    sce.initCause(ex);
    throw sce;
  }
}
origin: apache/kylin

@RequestMapping(value = "/{projectName}", method = { RequestMethod.DELETE }, produces = { "application/json" })
@ResponseBody
public void deleteProject(@PathVariable String projectName) {
  try {
    ProjectInstance project = projectService.getProjectManager().getProject(projectName);
    projectService.deleteProject(projectName, project);
  } catch (Exception e) {
    logger.error(e.getLocalizedMessage(), e);
    throw new InternalErrorException("Failed to delete project. " + " Caused by: " + e.getMessage(), e);
  }
}
origin: facebook/facebook-android-sdk

public static void invokeCallbackWithException(
  FacebookCallback<Sharer.Result> callback,
  final Exception exception) {
  if (exception instanceof FacebookException) {
    invokeOnErrorCallback(callback, (FacebookException) exception);
    return;
  }
  invokeCallbackWithError(
    callback,
    "Error preparing share content: " + exception.getLocalizedMessage());
}
origin: pentaho/pentaho-kettle

 public void dispose( StepMetaInterface smi, StepDataInterface sdi ) {
  meta = (ElasticSearchBulkMeta) smi;
  data = (ElasticSearchBulkData) sdi;
  try {
   disposeClient();
  } catch ( Exception e ) {
   logError( e.getLocalizedMessage(), e );
  }
  super.dispose( smi, sdi );
 }
}
origin: pentaho/pentaho-kettle

 private void writeData() {
  try {
   input.writeData();
  } catch ( Exception e ) {
   log.logDetailed( BaseMessages.getString( PKG, "RepositoryLogin.ErrorSavingRepositoryDefinition", e
    .getLocalizedMessage() ) );
   new ErrorDialog( shell, BaseMessages.getString( PKG, "Dialog.Error" ), BaseMessages.getString(
    PKG, "RepositoryLogin.ErrorSavingRepositoryDefinition", e.getLocalizedMessage() ), e );
  }
 }
}
origin: pentaho/pentaho-kettle

public void onClose( XulComponent sender, Status returnCode, Object retVal ) {
 if ( returnCode == Status.ACCEPT ) {
  try {
   ( (UIEERepositoryDirectory) repoObject ).delete( true );
  } catch ( Exception e ) {
   if ( mainController == null || !mainController.handleLostRepository( e ) ) {
    displayExceptionMessage( BaseMessages.getString( PKG, e.getLocalizedMessage() ) );
   }
  }
 }
}
origin: wildfly/wildfly

private void logException(String msg, Exception e) {
  if (log.isDebugEnabled()) {
    log.debug(msg, e);
  } else if (log.isWarnEnabled()) {
    log.warn("%s. Error is %s", msg, e.getLocalizedMessage());
  }
}
origin: wildfly/wildfly

  public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
    final String attributeName = operation.require(NAME).asString();
    final ServiceController<?> managementRepoService = context.getServiceRegistry(false).getService(
        ConnectorServices.MANAGEMENT_REPOSITORY_SERVICE);
    if (managementRepoService != null) {
      try {
        setModelValue(context.getResult(), attributeName);
      } catch (Exception e) {
        throw new OperationFailedException(ConnectorLogger.ROOT_LOGGER.failedToGetMetrics(e.getLocalizedMessage()));
      }
    }
  }
}, OperationContext.Stage.RUNTIME);
origin: wildfly/wildfly

  @Override
  public void accept(JChannel channel) {
    channel.disconnect();

    if (this.server != null) {
      try {
        JmxConfigurator.unregisterChannel(channel, this.server.get(), this.name);
      } catch (Exception e) {
        JGroupsLogger.ROOT_LOGGER.debug(e.getLocalizedMessage(), e);
      }
    }

    channel.close();
  }
}
origin: pentaho/pentaho-kettle

public void deleteUsers( List<IUser> users ) throws KettleException {
 ensureHasPermissions();
 try {
  userRoleWebService.deleteUsers( UserRoleHelper.convertToPentahoProxyUsers( users ) );
  lookupCache.removeUsersFromLookupSet( users );
  fireUserRoleListChange();
 } catch ( Exception e ) {
  throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
    "UserRoleDelegate.ERROR_0003_UNABLE_TO_DELETE_USERS", e.getLocalizedMessage() ), e ); //$NON-NLS-1$
 }
}
java.langExceptiongetLocalizedMessage

Popular methods of Exception

  • getMessage
  • printStackTrace
  • <init>
    Constructs a new exception with the specified cause and a detail message of (cause==null ? null : c
  • toString
  • getCause
  • getStackTrace
  • addSuppressed
  • initCause
  • fillInStackTrace
  • setStackTrace
  • getSuppressed
  • logWithStack
  • getSuppressed,
  • logWithStack

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ plugins
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