Skip to content

Commit

Permalink
Pass on original exceptions
Browse files Browse the repository at this point in the history
and rename test method to something more appropriate
  • Loading branch information
spacecowboy committed Nov 8, 2016
1 parent 7f2985e commit 675a4eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -25,11 +25,11 @@ public class UnexpectedStoreVersionException extends StoreFailureException

public UnexpectedStoreVersionException( String actualStoreVersion, String expectedStoreVersion )
{
this( String.format( MESSAGE, actualStoreVersion, expectedStoreVersion ) );
super( String.format( MESSAGE, actualStoreVersion, expectedStoreVersion ) );
}

public UnexpectedStoreVersionException( String msg )
public UnexpectedStoreVersionException( String msg, Throwable originalError )
{
super( msg );
super( msg, originalError );
}
}
Expand Up @@ -267,7 +267,7 @@ BackupOutcome doIncrementalBackupOrFallbackToFull( String sourceHostNameOrIp, in
if ( cause instanceof UpgradeNotAllowedByConfigurationException )
{
throw new UnexpectedStoreVersionException( "Failed to perform backup because existing backup is from " +
"a different version." );
"a different version.", e );
}

throw e;
Expand Down
Expand Up @@ -205,7 +205,7 @@ BackupOutcome executeBackup( HostnamePort hostnamePort, File to, ConsistencyChec
}
catch ( UnexpectedStoreVersionException e )
{
throw new ToolFailureException( e.getMessage() );
throw new ToolFailureException( e.getMessage(), e );
}
catch ( MismatchingStoreIdException e )
{
Expand Down
Expand Up @@ -74,7 +74,7 @@ public void teardown() throws Exception
}

@Test
public void oldIncompatibleBackupsAreMovedToSubDir() throws Exception
public void oldIncompatibleBackupsThrows() throws Exception
{
// Prepare an "old" backup
prepareNeoStoreFile( StandardV2_3.STORE_VERSION );
Expand Down

0 comments on commit 675a4eb

Please sign in to comment.