String getStackTraceAsString(Throwable t) {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      PrintStream ps = new PrintStream(out);
      t.printStackTrace(ps);
      return new String(out.toByteArray(), Charsets.UTF_8);
    }
@return - false if any exception happened.
amoro-ams/src/main/java/org/apache/amoro/server/terminal/TerminalSessionContext.java