Project

General

Profile

« Previous | Next » 

Revision 6659

generalize exception handling -- add cause detail

View differences:

src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
915 915
      }
916 916
      HazelcastService.getInstance().getSystemMetadataMap().unlock(pid);
917 917

  
918
    } catch(RuntimeException e) {
919
        // Catch Hazelcast RuntimeExceptions
920
        throw new ServiceFailure("4872", 
921
            "RuntimeException: Couldn't determine if node is allowed.");  
922
        
923
    } catch(Exception e) {
924
        throw new ServiceFailure("4872", 
918
    } catch (Exception e) {
919
    	ServiceFailure sf = new ServiceFailure("4872", 
925 920
                "General Exception: Couldn't determine if node is allowed: " + 
926 921
                e.getMessage());
922
    	sf.initCause(e);
923
        throw sf;
927 924
        
928 925
    } finally {
929 926
      // always unlock the pid

Also available in: Unified diff