Changeset 18
- Timestamp:
- 06/22/04 00:16:44
- Files:
-
- trunk/SubversionSharp/dev/src/SvnError.cs (modified) (5 diffs)
- trunk/SubversionSharp/dev/src/SvnException.cs (modified) (2 diffs)
- trunk/SubversionSharp/dev/src/SvnNullReferenceException.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SubversionSharp/dev/src/SvnError.cs
r8 r18 24 24 { 25 25 public int apr_err; 26 public SByte *message;26 public IntPtr message; 27 27 public svn_error_t *child; 28 28 public IntPtr pool; 29 public SByte *file;29 public IntPtr file; 30 30 public int line; 31 31 } … … 41 41 mError = ptr.ToPointer(); 42 42 } 43 44 public static SvnError NoError; 43 45 44 46 public bool IsNoError … … 77 79 #endregion 78 80 81 #region Wrapper methods 82 public static SvnError Create(int aprErr, SvnError err, string str) 83 { 84 return(new SvnError(Svn.svn_error_create(aprErr, new IntPtr(err.mError), str))); 85 } 86 87 public void Clear() 88 { 89 CheckPtr(); 90 Svn.svn_error_clear(new IntPtr(mError)); 91 } 92 #endregion 93 79 94 #region Wrapper properties 80 95 public int AprErr … … 87 102 } 88 103 89 public string Message104 public AprString Message 90 105 { 91 106 get 92 107 { 93 108 CheckPtr(); 94 return( new String(mError->message));95 } 109 return(mError->message); 110 } 96 111 } 97 112 … … 114 129 } 115 130 116 public string File131 public AprString File 117 132 { 118 133 get 119 134 { 120 135 CheckPtr(); 121 return( new String(mError->file));136 return(mError->file); 122 137 } 123 138 } trunk/SubversionSharp/dev/src/SvnException.cs
r7 r18 39 39 40 40 public SvnException(SvnError error) 41 : base ( error.Message )41 : base ( error.Message.ToString() ) 42 42 { 43 43 HResult = unchecked (Result + error.AprErr); 44 error.Clear(); 44 45 } 45 46 46 47 public SvnException(SvnError error, Exception innerException) 47 : base ( error.Message , innerException )48 : base ( error.Message.ToString(), innerException ) 48 49 { 49 50 HResult = unchecked (Result + error.AprErr); 51 error.Clear(); 50 52 } 51 53 … … 54 56 { 55 57 } 58 59 public virtual int AprErr 60 { 61 get 62 { 63 return( unchecked(HResult - Result) ); 64 } 65 } 56 66 } 57 67 } trunk/SubversionSharp/dev/src/SvnNullReferenceException.cs
r2 r18 53 53 { 54 54 } 55 56 public override int AprErr 57 { 58 get 59 { 60 return( unchecked(HResult - Result) ); 61 } 62 } 55 63 } 56 64 }