Skip to content

Commit

Permalink
2007-09-20 Carlos Guzmán Álvarez <carlosga05@gmail.com>
Browse files Browse the repository at this point in the history
	* Fixed issue #DNET-118
  • Loading branch information
carlosga committed Sep 20, 2007
1 parent 8e46b26 commit cfaec2a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 69 deletions.
69 changes: 35 additions & 34 deletions NETProvider/source/FirebirdSql/Data/Services/FbBackup.cs
Expand Up @@ -23,6 +23,7 @@
using System.Collections;

using FirebirdSql.Data.Common;
using FirebirdSql.Data.FirebirdClient;

namespace FirebirdSql.Data.Services
{
Expand Down Expand Up @@ -84,40 +85,40 @@ public FbBackup() : base()
/// <include file='Doc/en_EN/FbBackup.xml' path='doc/class[@name="FbBackup"]/method[@name="Execute"]/*'/>
public void Execute()
{
try
{
// Configure Spb
this.StartSpb = this.CreateParameterBuffer();

this.StartSpb.Append(IscCodes.isc_action_svc_backup);
this.StartSpb.Append(IscCodes.isc_spb_dbname, this.Database);

foreach (FbBackupFile file in backupFiles)
{
this.StartSpb.Append(IscCodes.isc_spb_bkp_file, file.BackupFile);
this.StartSpb.Append(IscCodes.isc_spb_bkp_length, file.BackupLength);
}

if (verbose)
{
this.StartSpb.Append(IscCodes.isc_spb_verbose);
}

this.StartSpb.Append(IscCodes.isc_spb_options, (int)this.options);

// Start execution
this.StartTask();

if (this.verbose)
{
this.ProcessServiceOutput();
}
}
catch
{
throw;
}
finally
try
{
// Configure Spb
this.StartSpb = this.CreateParameterBuffer();

this.StartSpb.Append(IscCodes.isc_action_svc_backup);
this.StartSpb.Append(IscCodes.isc_spb_dbname, this.Database);

foreach (FbBackupFile file in backupFiles)
{
this.StartSpb.Append(IscCodes.isc_spb_bkp_file, file.BackupFile);
this.StartSpb.Append(IscCodes.isc_spb_bkp_length, file.BackupLength);
}

if (verbose)
{
this.StartSpb.Append(IscCodes.isc_spb_verbose);
}

this.StartSpb.Append(IscCodes.isc_spb_options, (int)this.options);

// Start execution
this.StartTask();

if (this.verbose)
{
this.ProcessServiceOutput();
}
}
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
finally
{
// Close
this.Close();
Expand Down
10 changes: 5 additions & 5 deletions NETProvider/source/FirebirdSql/Data/Services/FbLog.cs
Expand Up @@ -52,11 +52,11 @@ public void Execute()
// Process service output
this.ProcessServiceOutput();
}
catch
{
throw;
}
finally
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
finally
{
this.Close();
}
Expand Down
10 changes: 5 additions & 5 deletions NETProvider/source/FirebirdSql/Data/Services/FbRestore.cs
Expand Up @@ -134,11 +134,11 @@ public void Execute()
this.ProcessServiceOutput();
}
}
catch
{
throw;
}
finally
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
finally
{
this.Close();
}
Expand Down
30 changes: 15 additions & 15 deletions NETProvider/source/FirebirdSql/Data/Services/FbService.cs
Expand Up @@ -190,11 +190,11 @@ protected void Open()

this.state = FbServiceState.Open;
}
catch (IscException ex)
{
throw new FbException(ex.Message, ex);
}
}
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
}

/// <include file='Doc/en_EN/FbService.xml' path='doc/class[@name="FbService"]/method[@name="Close"]/*'/>
protected void Close()
Expand All @@ -211,11 +211,11 @@ protected void Close()

this.state = FbServiceState.Closed;
}
catch (IscException ex)
{
throw new FbException(ex.Message, ex);
}
}
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
}

/// <include file='Doc/en_EN/FbService.xml' path='doc/class[@name="FbService"]/method[@name="startTask"]/*'/>
protected void StartTask()
Expand All @@ -231,11 +231,11 @@ protected void StartTask()
// Start service operation
this.svc.Start(this.StartSpb);
}
catch (IscException ex)
{
throw new FbException(ex.Message, ex);
}
}
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
}

/// <include file='Doc/en_EN/FbService.xml' path='doc/class[@name="FbService"]/method[@name="queryService"]/*'/>
protected byte[] QueryService(byte[] items)
Expand Down
10 changes: 5 additions & 5 deletions NETProvider/source/FirebirdSql/Data/Services/FbStatistical.cs
Expand Up @@ -71,11 +71,11 @@ public void Execute()
// Process service output
this.ProcessServiceOutput();
}
catch
{
throw;
}
finally
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
finally
{
this.Close();
}
Expand Down
10 changes: 5 additions & 5 deletions NETProvider/source/FirebirdSql/Data/Services/FbValidation.cs
Expand Up @@ -71,11 +71,11 @@ public void Execute()
// Process service output
this.ProcessServiceOutput();
}
catch
{
throw;
}
finally
catch (Exception ex)
{
throw new FbException(ex.Message, ex);
}
finally
{
this.Close();
}
Expand Down

0 comments on commit cfaec2a

Please sign in to comment.