Java Code Examples for com.alibaba.dubbo.common.io.UnsafeStringWriter#toString()
The following examples show how to use
com.alibaba.dubbo.common.io.UnsafeStringWriter#toString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StringUtils.java From dubbo-2.6.5 with Apache License 2.0 | 6 votes |
/** * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 2
Source File: StringUtils.java From dubbox with Apache License 2.0 | 6 votes |
/** * * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 3
Source File: StringUtils.java From dubbox-hystrix with Apache License 2.0 | 6 votes |
/** * * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 4
Source File: StringUtils.java From dubbo3 with Apache License 2.0 | 6 votes |
/** * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 5
Source File: StringUtils.java From dubbox with Apache License 2.0 | 6 votes |
/** * * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 6
Source File: StringUtils.java From dubbox with Apache License 2.0 | 6 votes |
/** * * @param e * @return string */ public static String toString(Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); PrintWriter p = new PrintWriter(w); p.print(e.getClass().getName()); if (e.getMessage() != null) { p.print(": " + e.getMessage()); } p.println(); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 7
Source File: StringUtils.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
/** * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); PrintWriter p = new PrintWriter(w); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 8
Source File: StringUtils.java From dubbox with Apache License 2.0 | 5 votes |
/** * * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); PrintWriter p = new PrintWriter(w); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 9
Source File: StringUtils.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
/** * * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); PrintWriter p = new PrintWriter(w); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 10
Source File: StringUtils.java From dubbo3 with Apache License 2.0 | 5 votes |
/** * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); try (PrintWriter p = new PrintWriter(w)) { e.printStackTrace(p); return w.toString(); } }
Example 11
Source File: StringUtils.java From dubbox with Apache License 2.0 | 5 votes |
/** * * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); PrintWriter p = new PrintWriter(w); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }
Example 12
Source File: StringUtils.java From dubbox with Apache License 2.0 | 5 votes |
/** * * @param msg * @param e * @return string */ public static String toString(String msg, Throwable e) { UnsafeStringWriter w = new UnsafeStringWriter(); w.write(msg + "\n"); PrintWriter p = new PrintWriter(w); try { e.printStackTrace(p); return w.toString(); } finally { p.close(); } }