src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -92,16 +92,16 @@
      */
     public static XPathFactory newInstance() {
 
         try {
                 return newInstance(DEFAULT_OBJECT_MODEL_URI);
-        } catch (XPathFactoryConfigurationException xpathFactoryConfigurationException) {
+        } catch (XPathFactoryConfigurationException e) {
                 throw new RuntimeException(
                         "XPathFactory#newInstance() failed to create an XPathFactory for the default object model: "
                         + DEFAULT_OBJECT_MODEL_URI
                         + " with the XPathFactoryConfigurationException: "
-                        + xpathFactoryConfigurationException.toString()
+                    + e.getMessage(), e
                 );
         }
     }
 
     /**