Skip to content

Commit

Permalink
Using general isc_network_error (DNET-813).
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Jan 23, 2019
1 parent 20cc9b3 commit 0db4528
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 39 deletions.
Expand Up @@ -114,7 +114,7 @@ public override byte[] GetSlice(int sliceLength)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -141,7 +141,7 @@ public override void PutSlice(Array sourceArray, int sliceLength)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -314,7 +314,7 @@ private byte[] ReceiveSliceResponse(ArrayDesc desc)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -156,7 +156,7 @@ protected override byte[] GetSegment()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -173,7 +173,7 @@ protected override void PutSegment(byte[] buffer)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -236,7 +236,7 @@ private void CreateOrOpen(int op, BlobParameterBuffer bpb)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -181,7 +181,7 @@ public virtual void Attach(DatabaseParameterBuffer dpb, string dataSource, int p
catch (IOException ex)
{
SafelyDetach();
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}

AfterAttachActions();
Expand Down Expand Up @@ -301,7 +301,7 @@ public virtual void CreateDatabase(DatabaseParameterBuffer dpb, string dataSourc
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -402,7 +402,7 @@ public virtual void ConnectionRequest(out int auxHandle, out string ipAddress, o
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -459,7 +459,7 @@ public void QueueEvents(RemoteEvent remoteEvent)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -477,7 +477,7 @@ public void CancelEvents(RemoteEvent events)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -621,7 +621,7 @@ public virtual void ReleaseObject(int op, int id)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -86,7 +86,7 @@ public virtual void Attach(ServiceParameterBuffer spb, string dataSource, int po
catch (IOException ex)
{
_database.Detach();
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -157,7 +157,7 @@ public virtual void Start(ServiceParameterBuffer spb)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -257,7 +257,7 @@ public override void Prepare(string commandText)
{
if (_state == StatementState.Allocated)
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -302,7 +302,7 @@ public override void Execute()
catch (IOException ex)
{
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -373,7 +373,7 @@ public override DbValue[] Fetch()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -450,7 +450,7 @@ protected void DoInfoSqlPacket(byte[] items, int bufferLength)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -514,7 +514,7 @@ protected void DoFreePacket(int option)
catch (IOException ex)
{
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -595,7 +595,7 @@ protected void ProcessStoredProcedureExecuteResponse(SqlResponse response)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}
#endregion
Expand Down Expand Up @@ -971,7 +971,7 @@ protected virtual byte[] WriteParameters()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -1004,7 +1004,7 @@ protected virtual DbValue[] ReadRow()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
return row;
}
Expand Down
Expand Up @@ -115,7 +115,7 @@ public override void BeginTransaction(TransactionParameterBuffer tpb)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -139,7 +139,7 @@ public override void Commit()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -163,7 +163,7 @@ public override void Rollback()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -183,7 +183,7 @@ public override void CommitRetaining()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -203,7 +203,7 @@ public override void RollbackRetaining()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -229,7 +229,7 @@ public override void Prepare()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand All @@ -252,7 +252,7 @@ public override void Prepare(byte[] buffer)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -82,7 +82,7 @@ public override void AttachWithTrustedAuth(DatabaseParameterBuffer dpb, string d
catch (IOException ex)
{
SafelyDetach();
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}

AfterAttachActions();
Expand Down Expand Up @@ -116,7 +116,7 @@ public override void ReleaseObject(int op, int id)
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -95,7 +95,7 @@ public override void Prepare(string commandText)
{
if (_state == StatementState.Allocated)
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down Expand Up @@ -165,7 +165,7 @@ public override void Execute()
catch (IOException ex)
{
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -109,7 +109,7 @@ public override void Execute()
catch (IOException ex)
{
_state = StatementState.Error;
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -51,7 +51,7 @@ public override void Attach(DatabaseParameterBuffer dpb, string dataSource, int
catch (IOException ex)
{
SafelyDetach();
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}

AfterAttachActions();
Expand Down Expand Up @@ -98,7 +98,7 @@ public override void CreateDatabase(DatabaseParameterBuffer dpb, string dataSour
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -39,7 +39,7 @@ public override void Attach(ServiceParameterBuffer spb, string dataSource, int p
catch (IOException ex)
{
Database.Detach();
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down
Expand Up @@ -79,7 +79,7 @@ protected override byte[] WriteParameters()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}

}
Expand Down Expand Up @@ -109,7 +109,7 @@ protected override DbValue[] ReadRow()
}
catch (IOException ex)
{
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
}
}

Expand Down

0 comments on commit 0db4528

Please sign in to comment.