Example #1
0
        static private Exception CreateInvalidOperationException(string operation, LispVariant l, LispVariant r)
        {
            var exception = new LispException(string.Format(NoOperatorForTypes, operation, l.Type, r.Type));

            exception.AddTokenInfos(l.Token);
            return(exception);
        }
Example #2
0
        private Exception CreateInvalidCastException(string name, string msg = "no")
        {
            var exception = new LispException(string.Format("Invalid cast for {2}, value={1} {0}", msg, StringValue, name));

            exception.AddTokenInfos(Token);
            return(exception);
        }