Ejemplo n.º 1
0
        private static string GetMessage(AutomataExceptionKind kind)
        {
            switch (kind)
            {
            case AutomataExceptionKind.AutomatonIsNondeterministic:
                return(AutomatonIsNotDeterministic);

            case AutomataExceptionKind.AutomatonIsNotEpsilonfree:
                return(AutomatonIsNotEpsilonfree);

            case AutomataExceptionKind.AutomatonMustBeNonempty:
                return(AutomatonMustBeNonempty);

            case AutomataExceptionKind.AutomatonMustNotContainDeadStates:
                return(AutomatonMustNotContainDeadStates);

            case AutomataExceptionKind.CharacterEncodingIsUnspecified:
                return(CharacterEncodingIsUnspecified);

            case AutomataExceptionKind.ContextCannotBePopped:
                return(ContextCannotBePopped);

            case AutomataExceptionKind.InputSortsMustBeIdentical:
                return(InputSortsMustBeIdentical);

            case AutomataExceptionKind.InvalidAutomatonName:
                return(InvalidAutomatonName);

            case AutomataExceptionKind.MisplacedEndAnchor:
                return(MisplacedEndAnchor);

            case AutomataExceptionKind.MisplacedStartAnchor:
                return(MisplacedStartAnchor);

            case AutomataExceptionKind.NoFinalState:
                return(NoFinalState);

            case AutomataExceptionKind.RegexConstructNotSupported:
                return(RegexConstructNotSupported);

            case AutomataExceptionKind.CharSetMustBeNonempty:
                return(CharSetMustBeNonempty);

            case AutomataExceptionKind.SolversAreNotIdentical:
                return(SolversMustBeIdentical);

            case AutomataExceptionKind.TheoryIsNotAsserted:
                return(TheoryMustBeAsserted);

            case AutomataExceptionKind.UnrecognizedRegex:
                return(UnrecognizedRegex);

            case AutomataExceptionKind.InternalError:
                return(InternalError);

            default:
                return(kind.ToString());
            }
        }
Ejemplo n.º 2
0
        private static string GetMessage(AutomataExceptionKind kind)
        {
            switch (kind)
            {
            case AutomataExceptionKind.CharacterEncodingIsUnspecified:
                return(CharacterEncodingIsUnspecified);

            case AutomataExceptionKind.CharSetMustBeNonempty:
                return(CharSetMustBeNonempty);

            case AutomataExceptionKind.UnrecognizedRegex:
                return(UnrecognizedRegex);

            case AutomataExceptionKind.InternalError:
                return(InternalError);

            default:
                return(kind.ToString());
            }
        }
Ejemplo n.º 3
0
 public AutomataException(AutomataExceptionKind kind, Exception innerException)
     : base(GetMessage(kind), innerException)
 {
     this.kind = kind;
 }
Ejemplo n.º 4
0
 public AutomataException(AutomataExceptionKind kind)
     : base(GetMessage(kind))
 {
     this.kind = kind;
 }
Ejemplo n.º 5
0
 public AutomataException(string message)
     : base(message)
 {
     kind = AutomataExceptionKind.Unspecified;
 }
Ejemplo n.º 6
0
 public AutomataException(string message, Exception innerException)
     : base(message, innerException)
 {
     kind = AutomataExceptionKind.Unspecified;
 }
Ejemplo n.º 7
0
 private static string GetMessage(AutomataExceptionKind kind)
 {
     switch (kind)
     {
         case AutomataExceptionKind.AutomatonIsNondeterministic:
             return AutomatonIsNotDeterministic;
         case AutomataExceptionKind.AutomatonIsNotEpsilonfree:
             return AutomatonIsNotEpsilonfree;
         case AutomataExceptionKind.AutomatonMustBeNonempty:
             return AutomatonMustBeNonempty;
         case AutomataExceptionKind.AutomatonMustNotContainDeadStates:
             return AutomatonMustNotContainDeadStates;
         case AutomataExceptionKind.CharacterEncodingIsUnspecified:
             return CharacterEncodingIsUnspecified;
         case AutomataExceptionKind.ContextCannotBePopped:
             return ContextCannotBePopped;
         case AutomataExceptionKind.InputSortsMustBeIdentical:
             return InputSortsMustBeIdentical;
         case AutomataExceptionKind.InvalidAutomatonName:
             return InvalidAutomatonName;
         case AutomataExceptionKind.MisplacedEndAnchor:
             return MisplacedEndAnchor;
         case AutomataExceptionKind.MisplacedStartAnchor:
             return MisplacedStartAnchor;
         case AutomataExceptionKind.NoFinalState:
             return NoFinalState;
         case AutomataExceptionKind.RegexConstructNotSupported:
             return RegexConstructNotSupported;
         case AutomataExceptionKind.CharSetMustBeNonempty:
             return CharSetMustBeNonempty;
         case AutomataExceptionKind.SolversAreNotIdentical:
             return SolversMustBeIdentical;
         case AutomataExceptionKind.TheoryIsNotAsserted:
             return TheoryMustBeAsserted;
         case AutomataExceptionKind.UnrecognizedRegex:
             return UnrecognizedRegex;
         case AutomataExceptionKind.InternalError:
             return InternalError;
         default:
             return kind.ToString();
     }
 }
Ejemplo n.º 8
0
 public AutomataException(AutomataExceptionKind kind, Exception innerException)
     : base(GetMessage(kind), innerException)
 {
     this.kind = kind;
 }
Ejemplo n.º 9
0
 public AutomataException(AutomataExceptionKind kind)
     : base(GetMessage(kind))
 {
     this.kind = kind;
 }
Ejemplo n.º 10
0
 public AutomataException(string message)
     : base(message)
 {
     kind = AutomataExceptionKind.Unspecified;
 }
Ejemplo n.º 11
0
 public AutomataException(string message, Exception innerException)
     : base(message, innerException)
 {
     kind = AutomataExceptionKind.Unspecified;
 }