001    package com.khubla.pragmatach.framework.api;
002    
003    import java.io.PrintWriter;
004    import java.io.StringWriter;
005    import java.io.Writer;
006    
007    /**
008     * @author tome
009     */
010    public class PragmatachException extends Exception {
011       private static final long serialVersionUID = 1L;
012    
013       public static String getExceptionTrace(Throwable throwable) {
014          final Writer result = new StringWriter();
015          final PrintWriter printWriter = new PrintWriter(result);
016          throwable.printStackTrace(printWriter);
017          return result.toString();
018       }
019    
020       public PragmatachException(Exception e) {
021          super(e);
022       }
023    
024       public PragmatachException(String e) {
025          super(e);
026       }
027    
028       public PragmatachException(String s, Exception e) {
029          super(s, e);
030       }
031    }