Changeset 30263


Ignore:
Timestamp:
2015-09-28T10:48:19+13:00 (9 years ago)
Author:
jmt12
Message:

Added an extra catch to report exceptions *other* than ClassNotFoundException when trying to dynamically load database wrapper class. Extended one other exception to show actual exception error message to aid in debugging certain errors only thrown when loading database wrappers outside the gsdl3.jar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/SimpleCollectionDatabase.java

    r29062 r30263  
    4141    public SimpleCollectionDatabase(String db_type)
    4242    {
    43 
    4443        if (db_type.toLowerCase().endsWith("server")) {
    4544            db_type = db_type.substring(0, db_type.length() - 6);
     
    7271            }
    7372        }
     73        catch (Exception ae) {
     74            logger.error("Couldn't create SimpleCollectionDatabase of type " + db_type);
     75            logger.info(ae.getMessage());
     76        }
    7477
    7578        try
     
    8083        {
    8184            logger.error("Failed to call the constructor " + dbwrap_name + "()");
     85            logger.info(e.getMessage());
    8286        }
    8387
Note: See TracChangeset for help on using the changeset viewer.