1 package org.collectionspace.services.nuxeo.client.java;
3 import org.collectionspace.services.common.document.DocumentException;
4 import org.nuxeo.ecm.core.api.WrappedException;
6 public class NuxeoDocumentException extends DocumentException {
11 private static final long serialVersionUID = 1L;
13 public NuxeoDocumentException() {
17 public NuxeoDocumentException(String msg) {
19 // TODO Auto-generated constructor stub
22 public NuxeoDocumentException(int errorCode) {
24 // TODO Auto-generated constructor stub
27 public NuxeoDocumentException(int errorCode, String errorReason) {
28 super(errorCode, errorReason);
29 // TODO Auto-generated constructor stub
32 public NuxeoDocumentException(String message, Throwable cause) {
33 super(message, cause);
34 // TODO Auto-generated constructor stub
37 public NuxeoDocumentException(Throwable cause) {
39 // TODO Auto-generated constructor stub
43 public String getCausesClassName() {
45 Throwable cause = super.getCause();
47 if (cause != null && cause instanceof WrappedException) {
48 WrappedException wrappedException = (WrappedException)cause;
49 result = wrappedException.getClassName();
51 result = cause != null ? super.getCausesClassName() : null;
57 protected boolean isNuxeoWrappedException(Throwable cause) {
58 boolean result = false;
60 String className = cause.getClass().getCanonicalName();
61 if (className.contains("org.nuxeo.ecm.core.api.WrappedException") == true) {