Changeset 4058


Ignore:
Timestamp:
09/25/03 18:20:25 (20 years ago)
Author:
piso
Message:

VECTOR-SUBSEQ: present a more informative error message if start > end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r4052 r4058  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.438 2003-09-25 16:33:18 piso Exp $
     5 * $Id: Primitives.java,v 1.439 2003-09-25 18:20:25 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    39553955            int start = Fixnum.getValue(second);
    39563956            int end = third != NIL ? Fixnum.getValue(third) : v.length();
    3957             if (start > end)
    3958                 throw new ConditionThrowable(new TypeError("start is greater than end"));
     3957            if (start > end) {
     3958                StringBuffer sb = new StringBuffer("start (");
     3959                sb.append(start);
     3960                sb.append(") is greater than end (");
     3961                sb.append(end);
     3962                sb.append(')');
     3963                throw new ConditionThrowable(new TypeError(sb.toString()));
     3964            }
    39593965            return v.subseq(start, end);
    39603966        }
Note: See TracChangeset for help on using the changeset viewer.