[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/samples codepage.cs,1.2,1.3
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/samples codepage.cs,1.2,1.3 |
Date: |
Fri, 15 Aug 2003 21:01:20 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/samples
In directory subversions:/tmp/cvs-serv822/samples
Modified Files:
codepage.cs
Log Message:
Make the codepage sample a little more robust against odd exception conditions.
Index: codepage.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/codepage.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** codepage.cs 8 Dec 2002 06:24:40 -0000 1.2
--- codepage.cs 16 Aug 2003 01:01:17 -0000 1.3
***************
*** 85,88 ****
--- 85,92 ----
enc = null;
}
+ catch(ArgumentException)
+ {
+ enc = null;
+ }
if(enc != null)
{
***************
*** 202,205 ****
--- 206,213 ----
numBytes = 0;
}
+ catch(NotSupportedException)
+ {
+ numBytes = 0;
+ }
if(numBytes > 0 &&
(numBytes != 1 || buf[0] != (byte)'?' || value ==
(int)'?'))
***************
*** 229,232 ****
--- 237,244 ----
enc = null;
}
+ catch(ArgumentException)
+ {
+ enc = null;
+ }
if(enc != null)
{
***************
*** 253,256 ****
--- 265,272 ----
enc = null;
}
+ catch(ArgumentException)
+ {
+ enc = null;
+ }
if(enc != null)
{
***************
*** 277,280 ****
--- 293,300 ----
enc = null;
}
+ catch(ArgumentException)
+ {
+ enc = null;
+ }
if(enc != null)
{
***************
*** 297,300 ****
--- 317,324 ----
}
catch(NotSupportedException)
+ {
+ enc = null;
+ }
+ catch(ArgumentException)
{
enc = null;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/samples codepage.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=