PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/Exceptions.cs

https://bitbucket.org/cvillamor/compiler
C# | 109 lines | 84 code | 20 blank | 5 comment | 0 complexity | 65828fbd737c3b75a445a70ed3648949 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.Serialization;
  6. using System.Runtime.Serialization.Formatters;
  7. namespace Compiler_
  8. {
  9. //Truncation error for Characters > 31
  10. class TruncationCharErrorException : Exception, ISerializable
  11. {
  12. public TruncationCharErrorException()
  13. {
  14. }
  15. public TruncationCharErrorException(string message)
  16. {
  17. }
  18. public TruncationCharErrorException(string message, Exception inner)
  19. {
  20. }
  21. public TruncationCharErrorException(SerializationInfo info, StreamingContext context)
  22. {
  23. }
  24. }
  25. //Syntax error for unexpected syntax mismatches
  26. class SyntaxErrorException : Exception, ISerializable
  27. {
  28. public SyntaxErrorException()
  29. {
  30. }
  31. public SyntaxErrorException(string message)
  32. {
  33. }
  34. public SyntaxErrorException(string message, Exception inner)
  35. {
  36. }
  37. public SyntaxErrorException(SerializationInfo info, StreamingContext context)
  38. {
  39. }
  40. }
  41. //Bad identifier Format such as 1A
  42. class BadIdentifierFormatException : Exception, ISerializable
  43. {
  44. public BadIdentifierFormatException()
  45. {
  46. }
  47. public BadIdentifierFormatException(string message)
  48. {
  49. }
  50. public BadIdentifierFormatException(string message, Exception inner)
  51. {
  52. }
  53. public BadIdentifierFormatException(SerializationInfo info, StreamingContext context)
  54. {
  55. }
  56. }
  57. //Bad identifier Format such as 1A
  58. class TokenTypeMismatchException : Exception, ISerializable
  59. {
  60. public TokenTypeMismatchException()
  61. {
  62. }
  63. public TokenTypeMismatchException(string message)
  64. {
  65. }
  66. public TokenTypeMismatchException(string message, Exception inner)
  67. {
  68. }
  69. public TokenTypeMismatchException(SerializationInfo info, StreamingContext context)
  70. {
  71. }
  72. }
  73. //Kludge to restart program. Whatever.
  74. class RestartException : Exception, ISerializable
  75. {
  76. public RestartException()
  77. {
  78. }
  79. public RestartException(string message)
  80. {
  81. }
  82. public RestartException(string message, Exception inner)
  83. {
  84. }
  85. public RestartException(SerializationInfo info, StreamingContext context)
  86. {
  87. }
  88. }
  89. }