[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7360] Adjusted error handling when repository can no
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [7360] Adjusted error handling when repository can not be created |
Date: |
Tue, 07 Jun 2011 20:53:44 +0000 |
Revision: 7360
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7360
Author: peturbjorn
Date: 2011-06-07 20:53:43 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Adjusted error handling when repository can not be created
Modified Paths:
--------------
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/UploadIfc.java
thirdparty/BIM_converter/trunk/src/main/resources/repository.properties
Modified:
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
2011-06-07 13:17:32 UTC (rev 7359)
+++
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
2011-06-07 20:53:43 UTC (rev 7360)
@@ -60,8 +60,8 @@
} catch (SdaiException e) {
-
e.printStackTrace();
+ throw new RepositoryExceptionUc("Could not create
session, reason:"+e.getMessage(), e);
}
}
protected void closeSdaiSession() {
Modified:
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/UploadIfc.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/UploadIfc.java
2011-06-07 13:17:32 UTC (rev 7359)
+++
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/UploadIfc.java
2011-06-07 20:53:43 UTC (rev 7360)
@@ -51,8 +51,16 @@
@Produces(MediaType.APPLICATION_XML)
public String uploadFile(@FormDataParam("file") File file,
@FormDataParam("file") FormDataContentDisposition fcdsFile,
@FormDataParam("file") InputStream attachmentFile) {
logger.debug("UploadFile initiated");
- RepositoriesImpl repo = new RepositoriesImpl();
+ RepositoriesImpl repo = null;
+ try {
+ repo = new RepositoriesImpl();
+ } catch (RepositoryExceptionUc e) {
+ logger.error("Error opening repository");
+ e.printStackTrace();
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?><error><type>general</type><message>"+e.getMessage()+"</message></error>";
+ }
+
try {
if(repo.checkIfRepositoryExists(this.repositoryName)) {
repo.deleteRepository(this.repositoryName);
Modified:
thirdparty/BIM_converter/trunk/src/main/resources/repository.properties
===================================================================
--- thirdparty/BIM_converter/trunk/src/main/resources/repository.properties
2011-06-07 13:17:32 UTC (rev 7359)
+++ thirdparty/BIM_converter/trunk/src/main/resources/repository.properties
2011-06-07 20:53:43 UTC (rev 7360)
@@ -2,4 +2,4 @@
test=Success!
# Directory for repositories
-repositories=repoDir
\ No newline at end of file
+repositories=jsdai-repository
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7360] Adjusted error handling when repository can not be created,
Petur Thorsteinsson <=