@Override
public void failed( final int migrationVersion, final String reason, final Throwable throwable ) {
StringWriter stackTrace = new StringWriter();
throwable.printStackTrace( new PrintWriter( stackTrace ) );
logger.error("Data Migration Manager processing failed", throwable);
final String storedMessage = String.format( "Failed to migrate, reason is appended. Error '%s' %s", reason,
stackTrace.toString() );
update( migrationVersion, storedMessage );
logger.error( "Unable to migrate version {} due to reason {}.", migrationVersion, reason, throwable );
failed = true;
migrationInfoSerialization.setStatusCode( pluginName, StatusCode.ERROR.status );
}