SyntaxException.cs 445 B

1234567891011121314151617181920
  1. using System;
  2. namespace EXTS
  3. {
  4. public class SyntaxException : Exception
  5. {
  6. string mg;
  7. public int ErrorPos { get; private set; }
  8. public override string Message => mg;
  9. public SyntaxException(string msg, int pos)
  10. {
  11. ErrorPos = pos;
  12. mg = msg;
  13. }
  14. public override string ToString() => "EXTS 编译错误:在第 " + ErrorPos + "字符:" + Message;
  15. }
  16. }