jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r412823 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Thu, 08 Jun 2006 18:21:49 GMT
Author: tripod
Date: Thu Jun  8 11:21:49 2006
New Revision: 412823

URL: http://svn.apache.org/viewvc?rev=412823&view=rev
Log:
adding better exception messages

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=412823&r1=412822&r2=412823&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Jun  8 11:21:49 2006
@@ -1410,7 +1410,8 @@
          */
         FileSystem getFileSystem() {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             return fs;
@@ -1420,12 +1421,14 @@
          * Returns the workspace persistence manager.
          *
          * @return the workspace persistence manager
-         * @throws RepositoryException if the persistence manager could not be instantiated/initialized
+         * @throws RepositoryException if the persistence manager could not be
+         * instantiated/initialized
          */
         PersistenceManager getPersistenceManager()
                 throws RepositoryException {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             return persistMgr;
@@ -1441,7 +1444,8 @@
         SharedItemStateManager getItemStateProvider()
                 throws RepositoryException {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             return itemStateMgr;
@@ -1454,7 +1458,8 @@
          */
         ObservationManagerFactory getObservationManagerFactory() {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             return obsMgrFactory;
@@ -1469,7 +1474,8 @@
          */
         SearchManager getSearchManager() throws RepositoryException {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             synchronized (this) {
@@ -1500,7 +1506,8 @@
          */
         LockManager getLockManager() throws RepositoryException {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             synchronized (this) {
@@ -1521,14 +1528,16 @@
          */
         SystemSession getSystemSession() throws RepositoryException {
             if (!isInitialized()) {
-                throw new IllegalStateException("not initialized");
+                throw new IllegalStateException("workspace '" + getName()
+                        + "' not initialized");
             }
 
             synchronized (this) {
                 // system session is lazily instantiated in order to avoid
                 // 'chicken & egg' bootstrap problems
                 if (systemSession == null) {
-                    systemSession = SystemSession.create(RepositoryImpl.this, config);
+                    systemSession =
+                            SystemSession.create(RepositoryImpl.this, config);
                 }
                 return systemSession;
             }



Mime
View raw message