dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO DirectoryNotFoundEx


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO DirectoryNotFoundException.cs,1.4,1.5 EndOfStreamException.cs,1.4,1.5 FileLoadException.cs,1.6,1.7 FileNotFoundException.cs,1.7,1.8 IOException.cs,1.6,1.7 PathTooLongException.cs,1.4,1.5
Date: Mon, 07 Apr 2003 00:22:54 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO
In directory subversions:/tmp/cvs-serv26075/runtime/System/IO

Modified Files:
        DirectoryNotFoundException.cs EndOfStreamException.cs 
        FileLoadException.cs FileNotFoundException.cs IOException.cs 
        PathTooLongException.cs 
Log Message:


Add serialization support to all of the exception classes in "runtime".


Index: DirectoryNotFoundException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/DirectoryNotFoundException.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** DirectoryNotFoundException.cs       5 Apr 2003 06:58:12 -0000       1.4
--- DirectoryNotFoundException.cs       7 Apr 2003 04:22:51 -0000       1.5
***************
*** 3,7 ****
   *            "System.IO.DirectoryNotFoundException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.IO.DirectoryNotFoundException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 25,28 ****
--- 25,29 ----
  using System;
  using Platform;
+ using System.Runtime.Serialization;
  
  public class DirectoryNotFoundException : IOException
***************
*** 35,38 ****
--- 36,44 ----
        public DirectoryNotFoundException(String msg, Exception inner)
                        : base(Errno.ENOTDIR, msg, inner) {}
+ #if !ECMA_COMPAT
+       protected DirectoryNotFoundException(SerializationInfo info,
+                                                                               
 StreamingContext context)
+                       : base(info, context) {}
+ #endif
  
        // Get the default message to use for this exception type.

Index: EndOfStreamException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/EndOfStreamException.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** EndOfStreamException.cs     5 Apr 2003 06:58:12 -0000       1.4
--- EndOfStreamException.cs     7 Apr 2003 04:22:51 -0000       1.5
***************
*** 3,7 ****
   *            "System.IO.EndOfStreamException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.IO.EndOfStreamException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 24,27 ****
--- 24,28 ----
  
  using System;
+ using System.Runtime.Serialization;
  
  public class EndOfStreamException : IOException
***************
*** 34,37 ****
--- 35,43 ----
        public EndOfStreamException(String msg, Exception inner)
                        : base(msg, inner) {}
+ #if !ECMA_COMPAT
+       protected EndOfStreamException(SerializationInfo info,
+                                                                  
StreamingContext context)
+                       : base(info, context) {}
+ #endif
  
        // Get the default message to use for this exception type.

Index: FileLoadException.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/FileLoadException.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** FileLoadException.cs        5 Apr 2003 06:58:12 -0000       1.6
--- FileLoadException.cs        7 Apr 2003 04:22:51 -0000       1.7
***************
*** 3,7 ****
   *            "System.IO.FileLoadException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.IO.FileLoadException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 25,28 ****
--- 25,29 ----
  using System;
  using Platform;
+ using System.Runtime.Serialization;
  
  public class FileLoadException : IOException
***************
*** 30,33 ****
--- 31,37 ----
        // Internal state.
        private String fileName;
+ #if !ECMA_COMPAT
+       private String fusionLog;
+ #endif
  
        // Constructors.
***************
*** 57,60 ****
--- 61,73 ----
                                this.fileName = fileName;
                        }
+ #if !ECMA_COMPAT
+       protected FileLoadException(SerializationInfo info,
+                                                               
StreamingContext context)
+                       : base(info, context)
+                       {
+                               fileName = info.GetString("FileLoad_FileName");
+                               fusionLog = 
info.GetString("FileLoad_FusionLog");
+                       }
+ #endif
  
        // Get the message for this exception.  Because of "MessageDefault",
***************
*** 119,128 ****
                                }
                        }
  #if !ECMA_COMPAT
        public String FusionLog
                        {
                                get
                                {
!                                       throw new 
NotImplementedException("FusionLog");
                                }
                        }
--- 132,143 ----
                                }
                        }
+ 
  #if !ECMA_COMPAT
+       // Get the fusion log associated with this exception.
        public String FusionLog
                        {
                                get
                                {
!                                       return fusionLog;
                                }
                        }
***************
*** 137,140 ****
--- 152,166 ----
                                }
                        }
+ 
+ #if !ECMA_COMPAT
+       // Get the serialization data for this object.
+       public override void GetObjectData(SerializationInfo info,
+                                                                          
StreamingContext context)
+                       {
+                               base.GetObjectData(info, context);
+                               info.AddValue("FileLoad_FileName", fileName);
+                               info.AddValue("FileLoad_FusionLog", fusionLog);
+                       }
+ #endif
  
  }; // class FileLoadException

Index: FileNotFoundException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/FileNotFoundException.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** FileNotFoundException.cs    5 Apr 2003 06:58:12 -0000       1.7
--- FileNotFoundException.cs    7 Apr 2003 04:22:51 -0000       1.8
***************
*** 3,7 ****
   *            "System.IO.FileNotFoundException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.IO.FileNotFoundException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 25,28 ****
--- 25,29 ----
  using System;
  using Platform;
+ using System.Runtime.Serialization;
  
  public class FileNotFoundException : IOException
***************
*** 30,33 ****
--- 31,37 ----
        // Internal state.
        private String fileName;
+ #if !ECMA_COMPAT
+       private String fusionLog;
+ #endif
  
        // Constructors.
***************
*** 57,60 ****
--- 61,73 ----
                                this.fileName = fileName;
                        }
+ #if !ECMA_COMPAT
+       protected FileNotFoundException(SerializationInfo info,
+                                                                       
StreamingContext context)
+                       : base(info, context)
+                       {
+                               fileName = 
info.GetString("FileNotFound_FileName");
+                               fusionLog = 
info.GetString("FileNotFound_FusionLog");
+                       }
+ #endif
  
        // Get the message for this exception.  Because of "MessageDefault",
***************
*** 119,130 ****
                                }
                        }
  #if !ECMA_COMPAT
        public String FusionLog
!       {
!               get
!               {
!                       throw new NotImplementedException("FusionLog");
!               }
!       }
  #endif
  
--- 132,145 ----
                                }
                        }
+ 
  #if !ECMA_COMPAT
+       // Get the fusion log for this exception.
        public String FusionLog
!                       {
!                               get
!                               {
!                                       return fusionLog;
!                               }
!                       }
  #endif
  
***************
*** 137,140 ****
--- 152,166 ----
                                }
                        }
+ 
+ #if !ECMA_COMPAT
+       // Get ther serialization data for this object.
+       public override void GetObjectData(SerializationInfo info,
+                                                                          
StreamingContext context)
+                       {
+                               base.GetObjectData(info, context);
+                               info.AddValue("FileNotFound_FileName", 
fileName);
+                               info.AddValue("FileNotFound_FusionLog", 
fusionLog);
+                       }
+ #endif
  
  }; // class FileNotFoundException

Index: IOException.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/IOException.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** IOException.cs      5 Apr 2003 06:58:12 -0000       1.6
--- IOException.cs      7 Apr 2003 04:22:51 -0000       1.7
***************
*** 2,6 ****
   * IOException.cs - Implementation of the "System.IO.IOException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 2,6 ----
   * IOException.cs - Implementation of the "System.IO.IOException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 24,27 ****
--- 24,28 ----
  using System;
  using Platform;
+ using System.Runtime.Serialization;
  
  public class IOException : SystemException
***************
*** 46,49 ****
--- 47,54 ----
                        errno = Errno.EIO;
                }
+ #if !ECMA_COMPAT
+       protected IOException(SerializationInfo info, StreamingContext context)
+               : base(info, context) {}
+ #endif
  
        // Internal constructors that are used to set correct error codes.

Index: PathTooLongException.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/PathTooLongException.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** PathTooLongException.cs     5 Apr 2003 06:58:12 -0000       1.4
--- PathTooLongException.cs     7 Apr 2003 04:22:51 -0000       1.5
***************
*** 3,7 ****
   *            "System.IO.PathTooLongException" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.IO.PathTooLongException" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 25,28 ****
--- 25,29 ----
  using System;
  using Platform;
+ using System.Runtime.Serialization;
  
  public class PathTooLongException : IOException
***************
*** 35,38 ****
--- 36,44 ----
        public PathTooLongException(String msg, Exception inner)
                        : base(Errno.ENAMETOOLONG, msg, inner) {}
+ #if !ECMA_COMPAT
+       protected PathTooLongException(SerializationInfo info,
+                                                                  
StreamingContext context)
+               : base(info, context) {}
+ #endif
  
        // Get the default message to use for this exception type.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]