Skip to content

Instantly share code, notes, and snippets.

@shenie
shenie / getStackTraceAsString.java
Created August 14, 2008 13:57 — forked from fuzzylizard/getStackTraceAsString.java
Return stack trace as string
public static String getStackTraceAsString(Exception e) {
StringWriter stackTrace = new StringWriter();
e.printStackTrace(new PrintWriter(stackTrace));
return stackTrace.toString();
}
// Written for Advanced Scraping (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
var util = require('util')