forked from olap4j/olap4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that all Java files comply with checkFile coding standard.
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@126 c6a108a4-781c-0410-a6c6-c2d559e19af0
- Loading branch information
1 parent
610aa2a
commit dfcb158
Showing
9 changed files
with
118 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
/* | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2007-2008 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package org.olap4j; | ||
|
||
import java.sql.SQLException; | ||
|
||
/** | ||
* Sugar class to help create OlapExceptions. | ||
* @author Luc Boudreau | ||
* @version $Id$ | ||
*/ | ||
public class OlapExceptionHelper { | ||
public static OlapException createException(String msg) { | ||
return new OlapException(msg); | ||
} | ||
|
||
public static OlapException createException(Throwable cause) { | ||
return new OlapException(cause.getMessage(), cause); | ||
} | ||
|
||
public static OlapException createException(String msg, Throwable cause) { | ||
return new OlapException(msg, cause); | ||
} | ||
|
||
public static OlapException createException(Cell context, String msg) { | ||
OlapException exception = new OlapException(msg); | ||
exception.setContext(context); | ||
return exception; | ||
} | ||
|
||
public static OlapException createException( | ||
Cell context, String msg, Throwable cause) | ||
{ | ||
OlapException exception = new OlapException(msg, cause); | ||
exception.setContext(context); | ||
return exception; | ||
} | ||
|
||
public static OlapException toOlapException(SQLException e) { | ||
if (e instanceof OlapException) { | ||
return (OlapException) e; | ||
} else { | ||
return new OlapException(null, e); | ||
} | ||
} | ||
} | ||
|
||
//End ExceptionHelper.java | ||
/* | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2007-2008 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package org.olap4j; | ||
|
||
import java.sql.SQLException; | ||
|
||
/** | ||
* Sugar class to help create OlapExceptions. | ||
* @author Luc Boudreau | ||
* @version $Id$ | ||
*/ | ||
public class OlapExceptionHelper { | ||
|
||
public static OlapException createException(String msg) { | ||
return new OlapException(msg); | ||
} | ||
|
||
public static OlapException createException(Throwable cause) { | ||
return new OlapException(cause.getMessage(), cause); | ||
} | ||
|
||
public static OlapException createException(String msg, Throwable cause) { | ||
return new OlapException(msg, cause); | ||
} | ||
|
||
public static OlapException createException(Cell context, String msg) { | ||
OlapException exception = new OlapException(msg); | ||
exception.setContext(context); | ||
return exception; | ||
} | ||
|
||
public static OlapException createException( | ||
Cell context, String msg, Throwable cause) | ||
{ | ||
OlapException exception = new OlapException(msg, cause); | ||
exception.setContext(context); | ||
return exception; | ||
} | ||
|
||
public static OlapException toOlapException(SQLException e) { | ||
if (e instanceof OlapException) { | ||
return (OlapException) e; | ||
} else { | ||
return new OlapException(null, e); | ||
} | ||
} | ||
} | ||
|
||
// End OlapExceptionHelper.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 26 additions & 25 deletions
51
src/org/olap4j/driver/xmla/proxy/XmlaOlap4jProxyException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
/* | ||
// $Id:$ | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2007-2008 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package org.olap4j.driver.xmla.proxy; | ||
|
||
/** | ||
* Gets thrown whenever an exception is encountered during the querying | ||
* of an XmlaOlap4jProxy subclass. | ||
* | ||
* @author Luc Boudreau | ||
* @version $Id:$ | ||
*/ | ||
public class XmlaOlap4jProxyException extends Exception { | ||
private static final long serialVersionUID = 1729906649527317997L; | ||
public XmlaOlap4jProxyException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} | ||
//End XmlaOlap4jProxyException.java | ||
/* | ||
// $Id$ | ||
// This software is subject to the terms of the Common Public License | ||
// Agreement, available at the following URL: | ||
// http://www.opensource.org/licenses/cpl.html. | ||
// Copyright (C) 2007-2008 Julian Hyde | ||
// All Rights Reserved. | ||
// You must accept the terms of that agreement to use this software. | ||
*/ | ||
package org.olap4j.driver.xmla.proxy; | ||
|
||
/** | ||
* Gets thrown whenever an exception is encountered during the querying | ||
* of an XmlaOlap4jProxy subclass. | ||
* | ||
* @author Luc Boudreau | ||
* @version $Id$ | ||
*/ | ||
public class XmlaOlap4jProxyException extends Exception { | ||
private static final long serialVersionUID = 1729906649527317997L; | ||
public XmlaOlap4jProxyException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} | ||
|
||
// End XmlaOlap4jProxyException.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters