Skip to content

Commit 0db4528

Browse files
committed
Using general isc_network_error (DNET-813).
1 parent 20cc9b3 commit 0db4528

File tree

12 files changed

+39
-39
lines changed

12 files changed

+39
-39
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsArray.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public override byte[] GetSlice(int sliceLength)
114114
}
115115
catch (IOException ex)
116116
{
117-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
117+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
118118
}
119119
}
120120

@@ -141,7 +141,7 @@ public override void PutSlice(Array sourceArray, int sliceLength)
141141
}
142142
catch (IOException ex)
143143
{
144-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
144+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
145145
}
146146
}
147147

@@ -314,7 +314,7 @@ private byte[] ReceiveSliceResponse(ArrayDesc desc)
314314
}
315315
catch (IOException ex)
316316
{
317-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
317+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
318318
}
319319
}
320320

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsBlob.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected override byte[] GetSegment()
156156
}
157157
catch (IOException ex)
158158
{
159-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
159+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
160160
}
161161
}
162162

@@ -173,7 +173,7 @@ protected override void PutSegment(byte[] buffer)
173173
}
174174
catch (IOException ex)
175175
{
176-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
176+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
177177
}
178178
}
179179

@@ -236,7 +236,7 @@ private void CreateOrOpen(int op, BlobParameterBuffer bpb)
236236
}
237237
catch (IOException ex)
238238
{
239-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
239+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
240240
}
241241
}
242242

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public virtual void Attach(DatabaseParameterBuffer dpb, string dataSource, int p
181181
catch (IOException ex)
182182
{
183183
SafelyDetach();
184-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
184+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
185185
}
186186

187187
AfterAttachActions();
@@ -301,7 +301,7 @@ public virtual void CreateDatabase(DatabaseParameterBuffer dpb, string dataSourc
301301
}
302302
catch (IOException ex)
303303
{
304-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
304+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
305305
}
306306
}
307307

@@ -402,7 +402,7 @@ public virtual void ConnectionRequest(out int auxHandle, out string ipAddress, o
402402
}
403403
catch (IOException ex)
404404
{
405-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
405+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
406406
}
407407
}
408408

@@ -459,7 +459,7 @@ public void QueueEvents(RemoteEvent remoteEvent)
459459
}
460460
catch (IOException ex)
461461
{
462-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
462+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
463463
}
464464
}
465465

@@ -477,7 +477,7 @@ public void CancelEvents(RemoteEvent events)
477477
}
478478
catch (IOException ex)
479479
{
480-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
480+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
481481
}
482482
}
483483

@@ -621,7 +621,7 @@ public virtual void ReleaseObject(int op, int id)
621621
}
622622
catch (IOException ex)
623623
{
624-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
624+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
625625
}
626626
}
627627

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsServiceManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public virtual void Attach(ServiceParameterBuffer spb, string dataSource, int po
8686
catch (IOException ex)
8787
{
8888
_database.Detach();
89-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
89+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
9090
}
9191
}
9292

@@ -157,7 +157,7 @@ public virtual void Start(ServiceParameterBuffer spb)
157157
}
158158
catch (IOException ex)
159159
{
160-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
160+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
161161
}
162162
}
163163

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsStatement.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public override void Prepare(string commandText)
257257
{
258258
if (_state == StatementState.Allocated)
259259
_state = StatementState.Error;
260-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
260+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
261261
}
262262
}
263263

@@ -302,7 +302,7 @@ public override void Execute()
302302
catch (IOException ex)
303303
{
304304
_state = StatementState.Error;
305-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
305+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
306306
}
307307
}
308308

@@ -373,7 +373,7 @@ public override DbValue[] Fetch()
373373
}
374374
catch (IOException ex)
375375
{
376-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
376+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
377377
}
378378
}
379379

@@ -450,7 +450,7 @@ protected void DoInfoSqlPacket(byte[] items, int bufferLength)
450450
}
451451
catch (IOException ex)
452452
{
453-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
453+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
454454
}
455455
}
456456

@@ -514,7 +514,7 @@ protected void DoFreePacket(int option)
514514
catch (IOException ex)
515515
{
516516
_state = StatementState.Error;
517-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
517+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
518518
}
519519
}
520520

@@ -595,7 +595,7 @@ protected void ProcessStoredProcedureExecuteResponse(SqlResponse response)
595595
}
596596
catch (IOException ex)
597597
{
598-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
598+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
599599
}
600600
}
601601
#endregion
@@ -971,7 +971,7 @@ protected virtual byte[] WriteParameters()
971971
}
972972
catch (IOException ex)
973973
{
974-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
974+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
975975
}
976976
}
977977

@@ -1004,7 +1004,7 @@ protected virtual DbValue[] ReadRow()
10041004
}
10051005
catch (IOException ex)
10061006
{
1007-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
1007+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
10081008
}
10091009
return row;
10101010
}

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsTransaction.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public override void BeginTransaction(TransactionParameterBuffer tpb)
115115
}
116116
catch (IOException ex)
117117
{
118-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
118+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
119119
}
120120
}
121121

@@ -139,7 +139,7 @@ public override void Commit()
139139
}
140140
catch (IOException ex)
141141
{
142-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
142+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
143143
}
144144
}
145145

@@ -163,7 +163,7 @@ public override void Rollback()
163163
}
164164
catch (IOException ex)
165165
{
166-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
166+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
167167
}
168168
}
169169

@@ -183,7 +183,7 @@ public override void CommitRetaining()
183183
}
184184
catch (IOException ex)
185185
{
186-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
186+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
187187
}
188188
}
189189

@@ -203,7 +203,7 @@ public override void RollbackRetaining()
203203
}
204204
catch (IOException ex)
205205
{
206-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
206+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
207207
}
208208
}
209209

@@ -229,7 +229,7 @@ public override void Prepare()
229229
}
230230
catch (IOException ex)
231231
{
232-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
232+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
233233
}
234234
}
235235

@@ -252,7 +252,7 @@ public override void Prepare(byte[] buffer)
252252
}
253253
catch (IOException ex)
254254
{
255-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
255+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
256256
}
257257
}
258258

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public override void AttachWithTrustedAuth(DatabaseParameterBuffer dpb, string d
8282
catch (IOException ex)
8383
{
8484
SafelyDetach();
85-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
85+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
8686
}
8787

8888
AfterAttachActions();
@@ -116,7 +116,7 @@ public override void ReleaseObject(int op, int id)
116116
}
117117
catch (IOException ex)
118118
{
119-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
119+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
120120
}
121121
}
122122

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version11/GdsStatement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override void Prepare(string commandText)
9595
{
9696
if (_state == StatementState.Allocated)
9797
_state = StatementState.Error;
98-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
98+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
9999
}
100100
}
101101

@@ -165,7 +165,7 @@ public override void Execute()
165165
catch (IOException ex)
166166
{
167167
_state = StatementState.Error;
168-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
168+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
169169
}
170170
}
171171

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version12/GdsStatement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public override void Execute()
109109
catch (IOException ex)
110110
{
111111
_state = StatementState.Error;
112-
throw IscException.ForErrorCode(IscCodes.isc_net_read_err, ex);
112+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
113113
}
114114
}
115115

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version13/GdsDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public override void Attach(DatabaseParameterBuffer dpb, string dataSource, int
5151
catch (IOException ex)
5252
{
5353
SafelyDetach();
54-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
54+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
5555
}
5656

5757
AfterAttachActions();
@@ -98,7 +98,7 @@ public override void CreateDatabase(DatabaseParameterBuffer dpb, string dataSour
9898
}
9999
catch (IOException ex)
100100
{
101-
throw IscException.ForErrorCode(IscCodes.isc_net_write_err, ex);
101+
throw IscException.ForErrorCode(IscCodes.isc_network_error, ex);
102102
}
103103
}
104104

0 commit comments

Comments
 (0)