ParserException.cs 825 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace PixiEditor.SDK.FileParsers
  7. {
  8. [Serializable]
  9. public class ParserException : Exception
  10. {
  11. public Type ParserType { get; }
  12. public ParserException(Type parserType) : base("A parser threw an exception") => ParserType = parserType;
  13. public ParserException(Type parserType, string message) : base(message) => ParserType = parserType;
  14. public ParserException(Type parserType, string message, Exception inner) : base(message, inner) => ParserType = parserType;
  15. protected ParserException(
  16. System.Runtime.Serialization.SerializationInfo info,
  17. System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
  18. }
  19. }