Question: ```
numberrange returns [String value]
    :   numberrangesub
        {
        String numberRange = ($numberrangesub.text);
        String [] v = numberRange.split(",");
        if ( Integer.parseInt(v[0].trim()) < Integer.parseInt(v[1].trim())) $value =numberRange;
        else throw new RecognitionException();
        }
    ;

```

Please observe the above ANTLR code. In this I want to throw a user friendly error message like `"from value should be less than to value in BETWEEN clause"`. 
I am expecting like this `RecognitionException("from value should be less than to value in BETWEEN clause");` But antlr did not accept like as above.

In java class where I am calling the generated java class by Antlr. I am handling like as follows.

```
try
{
    parser.numberRangeCheck();
}
catch (RecognitionException e)
{
    throw createException("Invalid Business logic syntax at  " + parser.getErrorHeader(e) + ", " + parser.getErrorMessage(e, null), Level.INFO, logger);
}

```

Any help will be appriciated.

Answer: 
try reordering your chaining like:

```
Product.currency(0.69).all

```

I have not tested that, but you may have issue with other arbitrary conditions since your `:select` contains `*`
Nevermind...

```
 named_scope :currency, :select => '*, price * 0.63 AS price'

```

seemed to work except I can't chain it to normal finds as I would like.