Throwable getMessage - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Throwable getMessage method.

This code example shows how to use the following methods:getMessage
  { 
    try { 
      return IndexIO.loadIndex(parentDir);
    } 
    catch (IOException e) {
      log.warn(e, "Got exception!!!! Going to delete parentDir[%s]", parentDir);
      try { 
        FileUtils.deleteDirectory(parentDir);
      } 
      catch (IOException e2) {
        log.error(e, "Problem deleting parentDir[%s]", parentDir);
      } 
      throw new SegmentLoadingException(e, "%s", e.getMessage());
    } 
  } 
} 
9
CodeRank
This code example shows how to use the following methods:getMessage
                Log.d("NotificationPlugin", "Notification: " + tag + ", " + title + ", " + body);
                int notificationFlag = getFlagValue(flag);
                showNotification(tag, title, body, notificationFlag);
            } catch (JSONException jsonEx) {
                Log.d("NotificationPlugin", "Got JSON Exception "
                        + jsonEx.getMessage());
                actionValid = false;
            } 
        } else if (CLEAR.equals(action)){
            try { 
                String tag = data.getString(0);
                Log.d("NotificationPlugin", "Notification cancel: " + tag);
                clearNotification(tag);
            } catch (JSONException jsonEx) {
                Log.d("NotificationPlugin", "Got JSON Exception " + jsonEx.getMessage());
                actionValid = false;
            } 
        } else { 
            actionValid = false;
            Log.d("NotificationPlugin", "Invalid action : "+action+" passed");
8
CodeRank
This code example shows how to use the following methods:getMessage
      // Use Oracle-specific db reader 
      return new OracleDataDrivenDBRecordReader<T>(split, inputClass,
          conf, getConnection(), dbConf, dbConf.getInputConditions(),
          dbConf.getInputFieldNames(), dbConf.getInputTableName());
    } catch (SQLException ex) {
      throw new IOException(ex.getMessage());
    } 
  } 
} 
8
CodeRank
This code example shows how to use the following methods:getMessage
            // and draw 
            content.draw(canvas);
 
            return Status.SUCCESS.createResult(image);
        } catch (IOException e) {
            return ERROR_UNKNOWN.createResult(e.getMessage(), e);
        } 
    } 
 
    protected BufferedImage getImage(int w, int h) {
        BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
        Graphics2D gc = image.createGraphics();
        gc.setComposite(AlphaComposite.Src);
 
        gc.setColor(new Color(0x00000000, true));
        gc.fillRect(0, 0, w, h);
 
        // done 
        gc.dispose();
 
8
CodeRank
This code example shows how to use the following methods:getMessage
                        Arrays.sort(r, 0, r.length);
                         
                        return r;
                    } catch (JSONException e) {
                        return new EvalError(ControlFunctionRegistry.getFunctionName(this) +
                                " fails to process a JSON array: " + e.getMessage());
                    } 
                } else if (v instanceof List<?>) {
                    List<? extends Comparable<Object>> a = (List<? extends Comparable<Object>>) v;
                    Collections.sort(a);
                     
                    return a;
                } 
            } 
        } 
        return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects an array");
    } 
 
    @Override 
    public void write(JSONWriter writer, Properties options)
8
CodeRank
This code example shows how to use the following methods:getMessage
    public void surfaceCreated(SurfaceHolder holder) {
        try { 
            mCamera.setPreviewDisplay(holder);
            mCamera.startPreview();
        } catch (IOException e) {
            Log.d(TAG, "Error setting camera preview: " + e.getMessage());
        } 
    } 
 
    public void surfaceDestroyed(SurfaceHolder holder) {
    } 
     
 
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
 
        if (mHolder.getSurface() == null){
          return; 
        } 
 
        try { 
8
CodeRank
This code example shows how to use the following methods:e, getMessage
		Log.e(TAG, e.getMessage(), e);
	} 
 
	@Override 
	public void onMalformedURLException(MalformedURLException e, final Object state) {
		Log.e(TAG, e.getMessage(), e);
	} 
} 
8
CodeRank
This code example shows how to use the following methods:d, getMessage
        try { 
            file = new RandomAccessFile(imagePath, "r");
            return BitmapFactory.decodeFileDescriptor(file.getFD(), null,
                    options);
        } catch (IOException e) {
            Log.d(TAG, e.getMessage(), e);
            return null; 
        } finally { 
            if (file != null)
                try { 
                    file.close();
                } catch (IOException e) {
                    Log.d(TAG, e.getMessage(), e);
                } 
        } 
    } 
 
    /** 
     * Get a bitmap from the image 
     * 
8
CodeRank
This code example shows how to use the following methods:getMessage
    @Override 
    public V txGet(long timeout, TimeUnit unit) throws ElasticSearchException {
        try { 
            return get(timeout, unit);
        } catch (TimeoutException e) {
            throw new ElasticSearchTimeoutException(e.getMessage());
        } catch (InterruptedException e) {
            throw new ElasticSearchInterruptedException(e.getMessage());
        } catch (ExecutionException e) {
            if (e.getCause() instanceof ElasticSearchException) {
                throw (ElasticSearchException) e.getCause();
            } else { 
                throw new TransportException("Failed execution", e);
            } 
        } 
    } 
 
    @Override 
    public V newInstance() { 
        return handler.newInstance();
7
CodeRank
This code example shows how to use the following methods:getMessage
 
			Date date = iso8601.toDate(value);
 
			return date;
		} catch (ParseException e) {
			throw new ConversionError("Error to convert Date: "	+ e.getMessage());
		} 
	} 
} 
7
CodeRank

Related Throwable getMessage Questions & Answers:

Other Throwable getMessage Examples

180:			return rss_url;
181:		}
182:	
183:		/**
184:		 * Method to get xml content from url HTTP Get request
-
186:		public String getXmlFromUrl(String url) {
187:			String xml = null;
188:	
189:			try {
190:				// request method is GET

Read More

131:		        } catch (Exception e) {
132:		        	Log.e("Error: ", e.getMessage());
133:		        }
134:	
135:		        return null;

Read More

54:		        } catch (Exception e) {
55:		        	Log.e("Error: ", e.getMessage());
56:		        }
57:	
58:		        return null;

Read More

getMessage Method Overview
Returns the detail message string of this throwable.
See Code Examples for other Java 8 Throwable Methods: