Exceptions.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. //
  2. // Exceptions.cs
  3. //
  4. // Author:
  5. // Lluis Sanchez Gual <lluis@novell.com>
  6. //
  7. // Copyright (c) 2010 Novell, Inc (http://www.novell.com)
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining a copy
  10. // of this software and associated documentation files (the "Software"), to deal
  11. // in the Software without restriction, including without limitation the rights
  12. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. // copies of the Software, and to permit persons to whom the Software is
  14. // furnished to do so, subject to the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be included in
  17. // all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25. // THE SOFTWARE.
  26. using System;
  27. namespace SharpCifs.Util.Sharpen
  28. {
  29. public class VirtualMachineError : Error
  30. {
  31. }
  32. public class StackOverflowError : VirtualMachineError
  33. {
  34. }
  35. public class BrokenBarrierException : Exception
  36. {
  37. }
  38. internal class BufferUnderflowException : Exception
  39. {
  40. }
  41. public class CharacterCodingException : Exception
  42. {
  43. }
  44. public class DataFormatException : Exception
  45. {
  46. }
  47. public class EofException : Exception
  48. {
  49. public EofException()
  50. {
  51. }
  52. public EofException(string msg) : base(msg)
  53. {
  54. }
  55. }
  56. public class Error : Exception
  57. {
  58. public Error()
  59. {
  60. }
  61. public Error(Exception ex) : base("Runtime Exception", ex)
  62. {
  63. }
  64. public Error(string msg) : base(msg)
  65. {
  66. }
  67. public Error(string msg, Exception ex) : base(msg, ex)
  68. {
  69. }
  70. }
  71. public class ExecutionException : Exception
  72. {
  73. public ExecutionException(Exception inner) : base("Execution failed", inner)
  74. {
  75. }
  76. }
  77. public class InstantiationException : Exception
  78. {
  79. }
  80. public class InterruptedIoException : Exception
  81. {
  82. public InterruptedIoException(string msg) : base(msg)
  83. {
  84. }
  85. }
  86. public class MissingResourceException : Exception
  87. {
  88. }
  89. public class NoSuchAlgorithmException : Exception
  90. {
  91. }
  92. public class NoSuchElementException : Exception
  93. {
  94. }
  95. internal class NoSuchMethodException : Exception
  96. {
  97. }
  98. internal class OverlappingFileLockException : Exception
  99. {
  100. }
  101. public class ParseException : Exception
  102. {
  103. public ParseException()
  104. {
  105. }
  106. public ParseException(string msg, int errorOffset)
  107. : base(string.Format("Msg: {0}. Error Offset: {1}", msg, errorOffset))
  108. {
  109. }
  110. }
  111. public class RuntimeException : Exception
  112. {
  113. public RuntimeException()
  114. {
  115. }
  116. public RuntimeException(Exception ex) : base("Runtime Exception", ex)
  117. {
  118. }
  119. public RuntimeException(string msg) : base(msg)
  120. {
  121. }
  122. public RuntimeException(string msg, Exception ex) : base(msg, ex)
  123. {
  124. }
  125. }
  126. internal class StringIndexOutOfBoundsException : Exception
  127. {
  128. }
  129. public class UnknownHostException : Exception
  130. {
  131. public UnknownHostException()
  132. {
  133. }
  134. public UnknownHostException(string message) : base(message)
  135. {
  136. }
  137. public UnknownHostException(Exception ex) : base("Host not found", ex)
  138. {
  139. }
  140. }
  141. public class UnsupportedEncodingException : Exception
  142. {
  143. }
  144. internal class UriSyntaxException : Exception
  145. {
  146. public UriSyntaxException(string s, string msg) : base(s + " " + msg)
  147. {
  148. }
  149. }
  150. internal class ZipException : Exception
  151. {
  152. }
  153. public class GitException : Exception
  154. {
  155. }
  156. public class ConnectException : Exception
  157. {
  158. public ConnectException(string msg) : base(msg)
  159. {
  160. }
  161. }
  162. class KeyManagementException : Exception
  163. {
  164. }
  165. class IllegalCharsetNameException : Exception
  166. {
  167. public IllegalCharsetNameException(string msg) : base(msg)
  168. {
  169. }
  170. }
  171. class UnsupportedCharsetException : Exception
  172. {
  173. public UnsupportedCharsetException(string msg) : base(msg)
  174. {
  175. }
  176. }
  177. }