Throwable printStackTrace - 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 printStackTrace method.

This code example shows how to use the following methods:printStackTrace
    public void save(Writer writer) {
        JSONWriter jsonWriter = new JSONWriter(writer);
        try { 
            write(jsonWriter, new Properties());
        } catch (JSONException e) {
            e.printStackTrace();
        } 
    } 
     
    static public ColumnGroup load(String s) throws Exception {
        JSONObject obj = ParsingUtilities.evaluateJsonStringToObject(s);
         
        return new ColumnGroup( 
            obj.getInt("startColumnIndex"),
            obj.getInt("columnSpan"),
            obj.getInt("keyColumnIndex")
        ); 
    } 
     
    protected void internalInitialize() { 
8
CodeRank
This code example shows how to use the following methods:printStackTrace
            throw new RuntimeException("naming error creating initial context", e);
        } 
        try { 
            dataSource.getConnection();
        } catch (SQLException e) {
            e.printStackTrace();
            throw new RuntimeException("datasource error getting connection", e);
        } 
 
        return null; 
    } 
 
    public static boolean getClosedByReaperThread() { 
        return closedByReaperThread.get();
    } 
 
    private Object close() {
        String currentThreadName = Thread.currentThread().getName();
        boolean isBackgroundReaperThread =
            TxUtils.isTransactionManagerTimeoutThread(); 
8
CodeRank
This code example shows how to use the following methods:printStackTrace
    public void save(Writer writer) {
        JSONWriter jsonWriter = new JSONWriter(writer);
        try { 
            write(jsonWriter, new Properties());
        } catch (JSONException e) {
            e.printStackTrace();
        } 
    } 
     
    static public Column load(String s) throws Exception {
        JSONObject obj = ParsingUtilities.evaluateJsonStringToObject(s);
        Column column = new Column(obj.getInt("cellIndex"), obj.getString("originalName"));
         
        column._name = obj.getString("name");
        if (obj.has("reconConfig")) {
            column._reconConfig = ReconConfig.reconstruct(obj.getJSONObject("reconConfig"));
        } 
        if (obj.has("reconStats")) {
            column._reconStats = ReconStats.load(obj.getJSONObject("reconStats"));
        } 
8
CodeRank
This code example shows how to use the following methods:printStackTrace
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} 
	    	   //setting.setDatabaseEnabled(enable); 
	           //setting.setDatabasePath(path); 
	       } else { 
	           /* feature not supported, do something else */ 
	           System.out.println("dump not supported");
	       } 
	   } 
} 
7
CodeRank
This code example shows how to use the following methods:printStackTrace
        //if (!url.endsWith("/")) 
        //    url += "/"; 
        try { 
            return new URL(url);
        } catch (MalformedURLException e) {
            e.printStackTrace();
            return null; 
        } 
    } 
 
    private BDJClassLoader(URL[] urls, String xletClass) {
        super(urls);
        this.xletClass = xletClass;
    } 
 
    protected Xlet loadXlet() throws ClassNotFoundException, 
            IllegalAccessException, InstantiationException { 
        return (Xlet)loadClass(xletClass).newInstance();
    } 
 
7
CodeRank
This code example shows how to use the following methods:printStackTrace
    public void save(Writer writer, Properties options) {
        JSONWriter jsonWriter = new JSONWriter(writer);
        try { 
            write(jsonWriter, options);
        } catch (JSONException e) {
            e.printStackTrace();
        } 
    } 
     
    static public Cell loadStreaming(String s, Pool pool) throws Exception {
        JsonFactory jsonFactory = new JsonFactory(); 
        JsonParser jp = jsonFactory.createJsonParser(s);
         
        if (jp.nextToken() != JsonToken.START_OBJECT) {
            return null; 
        } 
         
        return loadStreaming(jp, pool);
    } 
     
8
CodeRank
This code example shows how to use the following methods:getMessage, printStackTrace
        Log.e("Facebook", e.getMessage());
        e.printStackTrace();
    } 
 
    public void onMalformedURLException(MalformedURLException e) {
        Log.e("Facebook", e.getMessage());
        e.printStackTrace();
    } 
     
} 
7
CodeRank
This code example shows how to use the following methods:printStackTrace
			} catch (IllegalStateException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} 
			isRecording = true;
			recorder.start();
		} 
	} 
	 
	private void moveFile(String file) {
		/* this is a hack to save the file as the specified name */ 
		File f = new File (this.recording);
		f.renameTo(new File("/sdcard" + file));
	} 
	 
	protected void stopRecording(){ 
		try{ 
7
CodeRank
This code example shows how to use the following methods:printStackTrace
		} catch (FactoryConfigurationError e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (ParserConfigurationException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
 
		/* Our ExampleHandler now provides the parsed data to us. */ 
		return responsesHandler.getActionResponses();
	} 
 
} 
7
CodeRank
This code example shows how to use the following methods:printStackTrace
                try { 
                    File dump = new File(Environment.getExternalStorageDirectory(), "out.png");
                    out = new BufferedOutputStream(new FileOutputStream(dump));
                    b.compress(Bitmap.CompressFormat.PNG, 100, out);
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                } finally { 
                    if (out != null) try {
                        out.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    } 
                } 
            } 
        }); 
 
        Button button = new Button(this);
        button.setText("Remove/Add");
        button.setOnClickListener(new View.OnClickListener() {
            private boolean mAdded = true;
7
CodeRank

Related Throwable printStackTrace Questions & Answers:

Other Throwable printStackTrace Examples

47:	        imageView.setImageBitmap(bitmap);
48:	      } catch (FileNotFoundException e) {
49:	        e.printStackTrace();
50:	      } finally {
51:	        if (stream != null)
-
53:	            stream.close();
54:	          } catch (IOException e) {
55:	            e.printStackTrace();
56:	          }
57:	      }

Read More

15:	    }
16:	  } catch (Exception e) {
17:	    e.printStackTrace();
18:	  } finally {
19:	    if (reader != null) {
-
21:	        reader.close();
22:	      } catch (IOException e) {
23:	        e.printStackTrace();
24:	      }
25:	    }

Read More

6:	    object.put("nickname", "Hacker");
7:	  } catch (JSONException e) {
8:	    e.printStackTrace();
9:	  }
10:	  System.out.println(object);

Read More

70:					} catch (JSONException e) {
71:						// TODO Auto-generated catch block
72:						e.printStackTrace();
73:					}
74:

Read More

80:					} catch (Exception e) {
81:						// Check log for errors
82:						e.printStackTrace();
83:					}
84:	
-
153:	
154:			try {
155:				// Using JSoup library to parse the html source code
156:				org.jsoup.nodes.Document doc = Jsoup.connect(url).get();
157:				// finding rss links which are having link[type=application/rss+xml]
-
155:				// Using JSoup library to parse the html source code
156:				org.jsoup.nodes.Document doc = Jsoup.connect(url).get();
157:				// finding rss links which are having link[type=application/rss+xml]
158:				org.jsoup.select.Elements links = doc
159:						.select("link[type=application/rss+xml]");
-
157:				// finding rss links which are having link[type=application/rss+xml]
158:				org.jsoup.select.Elements links = doc
159:						.select("link[type=application/rss+xml]");
160:				
161:				Log.d("No of RSS links found", " " + links.size());

Read More

167:			@Override
168:			protected void onPreExecute() {
169:				super.onPreExecute();
170:				pDialog = new ProgressDialog(MainActivity.this);
171:				pDialog.setMessage("Creating new category..");

Read More

printStackTrace Method Overview
Prints this throwable and its backtrace to the standard error stream.
See Code Examples for other Java 8 Throwable Methods: