org.apache.cayenne.util.Util.unwindException()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中org.apache.cayenne.util.Util.unwindException()方法的一些代码示例,展示了Util.unwindException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.unwindException()方法的具体详情如下:
包路径:org.apache.cayenne.util.Util
类名称:Util
方法名:unwindException

Util.unwindException介绍

[英]Looks up and returns the root cause of an exception. If none is found, returns supplied Throwable object unchanged. If root is found, recursively "unwraps" it, and returns the result to the user.
[中]查找并返回异常的根本原因。如果找不到,则返回提供的可丢弃对象不变。如果找到root,则递归地“展开”它,并将结果返回给用户。

代码示例

代码示例来源:origin: org.apache.cayenne/cayenne-server

public void nextGlobalException(Exception ex) {
  globalExceptions.add(Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

public void processException(final Throwable th, final String message) {
    LOGGER.info("Exception on reverse engineering", Util.unwindException(th));
    SwingUtilities.invokeLater(new Runnable() {

      public void run() {
        JOptionPane.showMessageDialog(Application.getFrame(), th.getMessage(), message,
            JOptionPane.ERROR_MESSAGE);
      }
    });
  }
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
  public void nextGlobalException(Exception ex) {
    throw new CayenneRuntimeException("Raising from underlyingQueryEngine exception.", Util
        .unwindException(ex));
  }
});

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public void nextGlobalException(Exception ex) {
  throw new CayenneRuntimeException("Raising from underlyingQueryEngine exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

public void nextGlobalException(Exception ex) {
  throw new CayenneRuntimeException(
      "Raising from underlyingQueryEngine exception.",
      Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public void nextQueryException(Query query, Exception ex) {
  throw new CayenneRuntimeException("Raising from query exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public void nextGlobalException(Exception e) {
  throw new CayenneRuntimeException("Global exception.", Util.unwindException(e));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public void nextQueryException(Query query, Exception ex) {
  throw new CayenneRuntimeException("Raising from query exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public void nextQueryException(Query query, Exception ex) {
  throw new CayenneRuntimeException("Query exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

/**
 * Override the Oracle writeClob() method to be compatible with Oracle8
 * drivers.
 */
protected void writeClob(Clob clob, char[] value) {
  Method getWriterMethod = Oracle8Adapter.getWriterFromClobMethod();
  try {
    try (Writer out = (Writer) getWriterMethod.invoke(clob, (Object[]) null)) {
      out.write(value);
      out.flush();
    }
  } catch (Exception e) {
    throw new CayenneRuntimeException("Error processing CLOB.", Util.unwindException(e));
  }
}

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

static Throwable unwind(Throwable th) {
  if (th instanceof OgnlException) {
    Throwable reason = ((OgnlException) th).getReason();
    return (reason != null) ? unwind(reason) : th;
  }
  else {
    return Util.unwindException(th);
  }
}

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

static Throwable unwind(Throwable th) {
  if (th instanceof OgnlException) {
    Throwable reason = ((OgnlException) th).getReason();
    return (reason != null) ? unwind(reason) : th;
  }
  else {
    return Util.unwindException(th);
  }
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

/**
 * Overrides super implementation to rethrow an exception immediately.
 */
public void nextQueryException(Query query, Exception ex) {
  super.nextQueryException(query, ex);
  throw new CayenneRuntimeException("Query exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

/**
 * Overrides superclass implementation to rethrow an exception immediately.
 */
public void nextGlobalException(Exception ex) {
  super.nextGlobalException(ex);
  throw new CayenneRuntimeException("Global exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

/**
   * Overrides superclass implementation to rethrow an exception immediately.
   */
  public void nextGlobalException(Exception ex) {
    super.nextGlobalException(ex);
    throw new CayenneRuntimeException("Global exception.", Util.unwindException(ex));
  }
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
  @SuppressWarnings("unchecked")
  public T readRow(ResultSet resultSet) {
    try {
      return (T) converter.materializeObject(resultSet, index, type);
    } catch (CayenneRuntimeException cex) {
      // rethrow unmodified
      throw cex;
    } catch (Exception otherex) {
      throw new CayenneRuntimeException("Exception materializing column.", Util.unwindException(otherex));
    }
  }
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

public void nextGlobalException(Exception ex) {
  super.nextGlobalException(ex);
  throw new CayenneRuntimeException(
    "Raising from underlyingQueryEngine exception.",
    Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

/**
 * Overrides superclass implementation to rethrow an exception immediately.
 */
public void nextQueryException(Query query, Exception ex) {
  super.nextQueryException(query, ex);
  throw new CayenneRuntimeException("Query exception.", Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

public void nextQueryException(Query query, Exception ex) {
  super.nextQueryException(query, ex);
  throw new CayenneRuntimeException(
    "Raising from query exception.",
    Util.unwindException(ex));
}

代码示例来源:origin: org.apache.cayenne/cayenne-server

@Override
public Object evaluate(Object o) {
  // wrap in try/catch to provide unified exception processing
  try {
    return evaluateNode(o);
  } catch (Throwable th) {
    String string = this.toString();
    throw new ExpressionException("Error evaluating expression '%s'",
        string, Util.unwindException(th), string);
  }
}

相关文章