1 package org.simantics.db.testing.common;
2 /*******************************************************************************
3 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
11 * VTT Technical Research Centre of Finland - initial API and implementation
12 *******************************************************************************/
15 import java.io.PrintWriter;
16 import java.io.StringWriter;
18 public class ExceptionUtils {
20 public static String getStackTrace(Throwable e) {
22 StringWriter w = new StringWriter();
23 PrintWriter pw = new PrintWriter(w);
24 e.printStackTrace(pw);