You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2006/03/08 16:08:05 UTC

svn commit: r384229 - /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java

Author: imario
Date: Wed Mar  8 07:08:03 2006
New Revision: 384229

URL: http://svn.apache.org/viewcvs?rev=384229&view=rev
Log:
allow custom FileSystemExceptions

Modified:
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java?rev=384229&r1=384228&r2=384229&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/FileSystemException.java Wed Mar  8 07:08:03 2006
@@ -25,7 +25,7 @@
  * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  * @version $Revision$ $Date$
  */
-public final class FileSystemException
+public class FileSystemException
     extends IOException
 {
     /**
@@ -92,6 +92,17 @@
     /**
      * Constructs exception with the specified detail message.
      *
+     * @param code the error code of the message.
+     * @param info array of complementary info (context).
+     */
+    public FileSystemException(final String code, final Throwable throwable)
+    {
+        this(code, null, throwable);
+    }
+    
+    /**
+     * Constructs exception with the specified detail message.
+     *
      * @param code      the error code of the message.
      * @param info      array of complementary info (context).
      * @param throwable the cause.
@@ -100,7 +111,7 @@
                                final Object[] info,
                                final Throwable throwable)
     {
-        super(Messages.getString(code, info));
+        super(code);
 
         if (info == null)
         {
@@ -119,6 +130,14 @@
     }
 
     /**
+     * retrieve message from bundle
+     */
+    public String getMessage()
+	{
+    	return Messages.getString(super.getMessage(), getInfo());
+	}
+
+	/**
      * Constructs wrapper exception.
      *
      * @param throwable the root cause to wrap.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org