More improvements to fail() messages (add primary error msg)

This commit is contained in:
Tim Donohue
2013-10-23 14:55:15 -05:00
parent 82a413511c
commit 1182c54b72
12 changed files with 22 additions and 22 deletions

View File

@@ -63,12 +63,12 @@ public class CommunityTest extends AbstractDSpaceObjectTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init:" + ex.getMessage()); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init:" + ex.getMessage()); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -59,12 +59,12 @@ public class ItemComparatorTest extends AbstractUnitTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init"); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init:" + ex.getMessage());
} }
} }

View File

@@ -83,12 +83,12 @@ public class ItemIteratorTest extends AbstractUnitTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init"); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -76,12 +76,12 @@ public class ItemTest extends AbstractDSpaceObjectTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init:" + ex.getMessage()); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init:" + ex.getMessage()); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -70,12 +70,12 @@ public class MetadataFieldTest extends AbstractUnitTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorize Error in init", ex); log.error("Authorize Error in init", ex);
fail("Authorize Error in init"); fail("Authorize Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -51,7 +51,7 @@ public class MetadataSchemaTest extends AbstractUnitTest
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -73,12 +73,12 @@ public class MetadataValueTest extends AbstractUnitTest
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorize Error in init", ex); log.error("Authorize Error in init", ex);
fail("Authorize Error in init"); fail("Authorize Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -56,7 +56,7 @@ public class SiteTest extends AbstractUnitTest
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -84,12 +84,12 @@ public class SupervisedItemTest extends AbstractUnitTest
} }
catch (IOException ex) { catch (IOException ex) {
log.error("IO Error in init", ex); log.error("IO Error in init", ex);
fail("IO Error in init"); fail("IO Error in init: " + ex.getMessage());
} }
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init"); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {

View File

@@ -66,12 +66,12 @@ public class ThumbnailTest extends AbstractUnitTest
} }
catch (IOException ex) { catch (IOException ex) {
log.error("IO Error in init", ex); log.error("IO Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} }
} }

View File

@@ -75,15 +75,15 @@ public class VersioningTest extends AbstractUnitTest {
catch (AuthorizeException ex) catch (AuthorizeException ex)
{ {
log.error("Authorization Error in init", ex); log.error("Authorization Error in init", ex);
fail("Authorization Error in init"); fail("Authorization Error in init: " + ex.getMessage());
} }
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init"); fail("SQL Error in init: " + ex.getMessage());
} catch (IOException ex) { } catch (IOException ex) {
log.error("IO Error in init", ex); log.error("IO Error in init", ex);
fail("IO Error in init"); fail("IO Error in init: " + ex.getMessage());
} }
} }

View File

@@ -70,7 +70,7 @@ public class WorkspaceItemTest extends AbstractUnitTest
catch (SQLException ex) catch (SQLException ex)
{ {
log.error("SQL Error in init", ex); log.error("SQL Error in init", ex);
fail("SQL Error in init:" + ex.getMessage()); fail("SQL Error in init: " + ex.getMessage());
} }
} }