Changeset 3883


Ignore:
Timestamp:
09/19/03 01:46:43 (19 years ago)
Author:
piso
Message:

Conditions: work in progress.

Location:
trunk/j/src/org/armedbear/lisp
Files:
70 edited

Legend:

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

    r3848 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AbstractArray.java,v 1.8 2003-09-17 17:59:45 piso Exp $
     5 * $Id: AbstractArray.java,v 1.9 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public abstract class AbstractArray extends LispObject
    2525{
    26     public LispObject typep(LispObject type) throws LispError
     26    public LispObject typep(LispObject type) throws ConditionThrowable
    2727    {
    2828        if (type == Symbol.ARRAY)
     
    3333    }
    3434
    35     public boolean equalp(LispObject obj) throws LispError
     35    public boolean equalp(LispObject obj) throws ConditionThrowable
    3636    {
    3737        if (obj instanceof AbstractArray) {
     
    5252    }
    5353
    54     public LispObject AREF(LispObject index) throws LispError
     54    public LispObject AREF(LispObject index) throws ConditionThrowable
    5555    {
    5656        StringBuffer sb = new StringBuffer("AREF: ");
    5757        sb.append("wrong number of subscripts (1) for array of rank ");
    5858        sb.append(getRank());
    59         throw new ProgramError(sb.toString());
     59        throw new ConditionThrowable(new ProgramError(sb.toString()));
    6060    }
    6161
     
    6464    public abstract LispObject getDimensions();
    6565
    66     public abstract int getDimension(int n) throws LispError;
     66    public abstract int getDimension(int n) throws ConditionThrowable;
    6767
    6868    public abstract LispObject getElementType();
     
    7070    public abstract int getTotalSize();
    7171
    72     public abstract LispObject getRowMajor(int index) throws LispError;
     72    public abstract LispObject getRowMajor(int index) throws ConditionThrowable;
    7373
    74     public abstract void setRowMajor(int index, LispObject newValue) throws LispError;
     74    public abstract void setRowMajor(int index, LispObject newValue) throws ConditionThrowable;
    7575}
  • trunk/j/src/org/armedbear/lisp/AbstractVector.java

    r3848 r3883  
    2525    protected int fillPointer = -1; // -1 indicates no fill pointer.
    2626
    27     public LispObject typep(LispObject type) throws LispError
     27    public LispObject typep(LispObject type) throws ConditionThrowable
    2828    {
    2929        if (type == Symbol.VECTOR)
     
    4747    }
    4848
    49     public boolean equalp(LispObject obj) throws LispError
     49    public boolean equalp(LispObject obj) throws ConditionThrowable
    5050    {
    5151        if (obj instanceof AbstractVector) {
     
    7171    }
    7272
    73     public final int getDimension(int n) throws LispError
     73    public final int getDimension(int n) throws ConditionThrowable
    7474    {
    7575        if (n != 0)
     
    8787    public abstract void ensureCapacity(int minCapacity);
    8888
    89     public abstract LispObject get(int index) throws LispError;
     89    public abstract LispObject get(int index) throws ConditionThrowable;
    9090
    91     public abstract void set(int index, LispObject newValue) throws LispError;
     91    public abstract void set(int index, LispObject newValue) throws ConditionThrowable;
    9292
    93     public abstract LispObject subseq(int start, int end) throws LispError;
     93    public abstract LispObject subseq(int start, int end) throws ConditionThrowable;
    9494
    95     public abstract void fill(LispObject obj) throws LispError;
     95    public abstract void fill(LispObject obj) throws ConditionThrowable;
    9696
    97     public abstract void shrink(int n) throws LispError;
     97    public abstract void shrink(int n) throws ConditionThrowable;
    9898
    99     public int checkIndex(int index) throws LispError
     99    public int checkIndex(int index) throws ConditionThrowable
    100100    {
    101101        if (index < 0 || index >= capacity())
     
    104104    }
    105105
    106     public int checkIndex(LispObject index) throws LispError
     106    public int checkIndex(LispObject index) throws ConditionThrowable
    107107    {
    108108        int i = Fixnum.getValue(index);
     
    112112    }
    113113
    114     protected void badIndex(int index, int limit) throws LispError
     114    protected void badIndex(int index, int limit) throws ConditionThrowable
    115115    {
    116116        StringBuffer sb = new StringBuffer("invalid array index ");
     
    136136    }
    137137
    138     public void setFillPointer(LispObject obj) throws LispError
     138    public void setFillPointer(LispObject obj) throws ConditionThrowable
    139139    {
    140140        if (obj == T)
     
    165165    }
    166166
    167     public abstract LispObject reverse() throws LispError;
     167    public abstract LispObject reverse() throws ConditionThrowable;
    168168
    169     public void nreverse() throws LispError
     169    public void nreverse() throws ConditionThrowable
    170170    {
    171171        int i = 0;
  • trunk/j/src/org/armedbear/lisp/Array.java

    r3848 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Array.java,v 1.11 2003-09-17 18:00:54 piso Exp $
     5 * $Id: Array.java,v 1.12 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3636    }
    3737
    38     public Array(int[] dimv, LispObject initialContents) throws LispError
     38    public Array(int[] dimv, LispObject initialContents) throws ConditionThrowable
    3939    {
    4040        this.dimv = dimv;
     
    5050    }
    5151
    52     public Array(int rank, LispObject initialContents) throws LispError
     52    public Array(int rank, LispObject initialContents) throws ConditionThrowable
    5353    {
    5454        if (rank == 0) {
     
    7373    private int setInitialContents(int axis, int[] dims, LispObject contents,
    7474                                   int index)
    75         throws LispError
     75        throws ConditionThrowable
    7676    {
    7777        if (dims.length == 0) {
     
    129129    }
    130130
    131     public LispObject typep(LispObject typeSpecifier) throws LispError
     131    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    132132    {
    133133        if (typeSpecifier == Symbol.SIMPLE_ARRAY)
     
    149149    }
    150150
    151     public int getDimension(int n) throws LispError
     151    public int getDimension(int n) throws ConditionThrowable
    152152    {
    153153        try {
     
    169169    }
    170170
    171     public LispObject getRowMajor(int index) throws LispError
     171    public LispObject getRowMajor(int index) throws ConditionThrowable
    172172    {
    173173        try {
     
    179179    }
    180180
    181     public void setRowMajor(int index, LispObject newValue) throws LispError
     181    public void setRowMajor(int index, LispObject newValue) throws ConditionThrowable
    182182    {
    183183        try {
  • trunk/j/src/org/armedbear/lisp/Autoload.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Autoload.java,v 1.67 2003-09-19 00:05:09 piso Exp $
     5 * $Id: Autoload.java,v 1.68 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5454                pkg.export(symbol);
    5555            }
    56             catch (LispError e) {
     56            catch (ConditionThrowable t) {
    5757                Debug.assertTrue(false);
    5858            }
     
    118118        new Primitive("autoload", PACKAGE_SYS, true)
    119119    {
    120         public LispObject execute(LispObject first) throws LispError
     120        public LispObject execute(LispObject first) throws ConditionThrowable
    121121        {
    122122            if (first instanceof Symbol) {
     
    135135        }
    136136        public LispObject execute(LispObject first, LispObject second)
    137             throws LispError
     137            throws ConditionThrowable
    138138        {
    139139            final String fileName = LispString.getValue(second);
  • trunk/j/src/org/armedbear/lisp/AutoloadMacro.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AutoloadMacro.java,v 1.2 2003-09-19 00:05:09 piso Exp $
     5 * $Id: AutoloadMacro.java,v 1.3 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5252        new Primitive("autoload-macro", PACKAGE_SYS, true)
    5353    {
    54         public LispObject execute(LispObject first) throws LispError
     54        public LispObject execute(LispObject first) throws ConditionThrowable
    5555        {
    5656            if (first instanceof Symbol) {
     
    6969        }
    7070        public LispObject execute(LispObject first, LispObject second)
    71             throws LispError
     71            throws ConditionThrowable
    7272        {
    7373            final String fileName = LispString.getValue(second);
  • trunk/j/src/org/armedbear/lisp/Bignum.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Bignum.java,v 1.42 2003-09-19 00:05:09 piso Exp $
     5 * $Id: Bignum.java,v 1.43 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4848    }
    4949
    50     public LispObject typep(LispObject type) throws LispError
     50    public LispObject typep(LispObject type) throws ConditionThrowable
    5151    {
    5252        if (type == Symbol.BIGNUM)
     
    122122    }
    123123
    124     public boolean equalp(LispObject obj) throws LispError
     124    public boolean equalp(LispObject obj) throws ConditionThrowable
    125125    {
    126126        if (obj instanceof Bignum)
     
    182182    }
    183183
    184     public static BigInteger getValue(LispObject obj) throws LispError
     184    public static BigInteger getValue(LispObject obj) throws ConditionThrowable
    185185    {
    186186        try {
     
    207207    }
    208208
    209     public LispObject add(LispObject obj) throws LispError
     209    public LispObject add(LispObject obj) throws ConditionThrowable
    210210    {
    211211        if (obj instanceof Fixnum)
     
    228228    }
    229229
    230     public LispObject subtract(LispObject obj) throws LispError
     230    public LispObject subtract(LispObject obj) throws ConditionThrowable
    231231    {
    232232        if (obj instanceof Fixnum)
     
    250250    }
    251251
    252     public LispObject multiplyBy(LispObject obj) throws LispError
     252    public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
    253253    {
    254254        if (obj instanceof Fixnum) {
     
    271271    }
    272272
    273     public LispObject divideBy(LispObject obj) throws LispError
     273    public LispObject divideBy(LispObject obj) throws ConditionThrowable
    274274    {
    275275        if (obj instanceof Fixnum)
     
    286286    }
    287287
    288     public boolean isEqualTo(LispObject obj) throws LispError
     288    public boolean isEqualTo(LispObject obj) throws ConditionThrowable
    289289    {
    290290        if (obj instanceof Bignum)
     
    297297    }
    298298
    299     public boolean isNotEqualTo(LispObject obj) throws LispError
     299    public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
    300300    {
    301301        if (obj instanceof Bignum)
     
    308308    }
    309309
    310     public boolean isLessThan(LispObject obj) throws LispError
     310    public boolean isLessThan(LispObject obj) throws ConditionThrowable
    311311    {
    312312        if (obj instanceof Fixnum)
     
    323323    }
    324324
    325     public boolean isGreaterThan(LispObject obj) throws LispError
     325    public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
    326326    {
    327327        if (obj instanceof Fixnum)
     
    338338    }
    339339
    340     public boolean isLessThanOrEqualTo(LispObject obj) throws LispError
     340    public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
    341341    {
    342342        if (obj instanceof Fixnum)
     
    353353    }
    354354
    355     public boolean isGreaterThanOrEqualTo(LispObject obj) throws LispError
     355    public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
    356356    {
    357357        if (obj instanceof Fixnum)
  • trunk/j/src/org/armedbear/lisp/BinaryInputStream.java

    r1597 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: BinaryInputStream.java,v 1.1 2003-04-09 18:08:29 piso Exp $
     5 * $Id: BinaryInputStream.java,v 1.2 2003-09-19 01:46:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3737    // read-byte stream &optional eof-error-p eof-value => byte
    3838    public LispObject readByte(boolean eofError, LispObject eofValue)
    39         throws LispError
     39        throws ConditionThrowable
    4040    {
    4141        int n;
  • trunk/j/src/org/armedbear/lisp/BitVector.java

    r3781 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: BitVector.java,v 1.22 2003-09-14 17:36:11 piso Exp $
     5 * $Id: BitVector.java,v 1.23 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2929    private long[] bits;
    3030
    31     public BitVector(int length) throws LispError
     31    public BitVector(int length) throws ConditionThrowable
    3232    {
    3333        if (length < 0)
     
    4040    }
    4141
    42     public BitVector(String s) throws LispError
     42    public BitVector(String s) throws ConditionThrowable
    4343    {
    4444        this(s.length());
     
    6161    }
    6262
    63     public LispObject typep(LispObject typeSpecifier) throws LispError
     63    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    6464    {
    6565        if (typeSpecifier == Symbol.BIT_VECTOR)
     
    119119    }
    120120
    121     public LispObject elt(int index) throws LispError
     121    public LispObject elt(int index) throws ConditionThrowable
    122122    {
    123123        if (index < 0 || index >= length())
     
    128128
    129129    // Ignores fill pointer.
    130     public LispObject AREF(LispObject index) throws LispError
     130    public LispObject AREF(LispObject index) throws ConditionThrowable
    131131    {
    132132        return get(Fixnum.getValue(index));
    133133    }
    134134
    135     public LispObject reverse() throws LispError
     135    public LispObject reverse() throws ConditionThrowable
    136136    {
    137137        int length = length();
     
    147147    }
    148148
    149     public LispObject getRowMajor(int index) throws LispError
     149    public LispObject getRowMajor(int index) throws ConditionThrowable
    150150    {
    151151        return get(index);
    152152    }
    153153
    154     public void setRowMajor(int index, LispObject newValue) throws LispError
     154    public void setRowMajor(int index, LispObject newValue) throws ConditionThrowable
    155155    {
    156156        set(index, newValue);
    157157    }
    158158
    159     public LispObject get(int index) throws LispError
     159    public LispObject get(int index) throws ConditionThrowable
    160160    {
    161161        if (index >= capacity)
     
    171171    }
    172172
    173     public void set(int index, LispObject newValue) throws LispError
     173    public void set(int index, LispObject newValue) throws ConditionThrowable
    174174    {
    175175        if (index >= capacity)
     
    203203    }
    204204
    205     public LispObject subseq(int start, int end) throws LispError
     205    public LispObject subseq(int start, int end) throws ConditionThrowable
    206206    {
    207207        BitVector v = new BitVector(end - start);
     
    216216    }
    217217
    218     public void fill(LispObject obj) throws LispError
     218    public void fill(LispObject obj) throws ConditionThrowable
    219219    {
    220220        try {
     
    236236    }
    237237
    238     public void shrink(int n) throws LispError
     238    public void shrink(int n) throws ConditionThrowable
    239239    {
    240240        if (n < capacity) {
     
    260260    }
    261261
    262     public boolean equal(LispObject obj) throws LispError
     262    public boolean equal(LispObject obj) throws ConditionThrowable
    263263    {
    264264        if (this == obj)
     
    277277    }
    278278
    279     public boolean equalp(LispObject obj) throws LispError
     279    public boolean equalp(LispObject obj) throws ConditionThrowable
    280280    {
    281281        if (this == obj)
  • trunk/j/src/org/armedbear/lisp/CharacterFunctions.java

    r2615 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CharacterFunctions.java,v 1.2 2003-06-26 02:36:14 piso Exp $
     5 * $Id: CharacterFunctions.java,v 1.3 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2727    private static final Primitive CHAR_EQUALS = new Primitive("char=") {
    2828        public LispObject execute(LispObject first, LispObject second)
    29             throws LispError
     29            throws ConditionThrowable
    3030        {
    3131            return LispCharacter.getValue(first) == LispCharacter.getValue(second) ? T : NIL;
    3232        }
    33         public LispObject execute(LispObject[] array) throws LispError
     33        public LispObject execute(LispObject[] array) throws ConditionThrowable
    3434        {
    3535            final int length = array.length;
    3636            if (length == 0)
    37                 throw new WrongNumberOfArgumentsException(this);
     37                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    3838            if (length > 1) {
    3939                final char c0 = LispCharacter.getValue(array[0]);
     
    5050    private static final Primitive CHAR_EQUAL = new Primitive("char-equal") {
    5151        public LispObject execute(LispObject first, LispObject second)
    52             throws LispError
     52            throws ConditionThrowable
    5353        {
    5454            char c1 = LispCharacter.getValue(first);
     
    6262            return NIL;
    6363        }
    64         public LispObject execute(LispObject[] array) throws LispError
     64        public LispObject execute(LispObject[] array) throws ConditionThrowable
    6565        {
    6666            final int length = array.length;
    6767            if (length == 0)
    68                 throw new WrongNumberOfArgumentsException(this);
     68                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    6969            if (length > 1) {
    7070                final char c0 = LispCharacter.getValue(array[0]);
     
    8888        new Primitive("char-greaterp") {
    8989        public LispObject execute(LispObject first, LispObject second)
    90             throws LispError
     90            throws ConditionThrowable
    9191        {
    9292            char c1 = Character.toUpperCase(LispCharacter.getValue(first));
     
    9494            return c1 > c2 ? T : NIL;
    9595        }
    96         public LispObject execute(LispObject[] array) throws LispError
     96        public LispObject execute(LispObject[] array) throws ConditionThrowable
    9797        {
    9898            final int length = array.length;
    9999            if (length == 0)
    100                 throw new WrongNumberOfArgumentsException(this);
     100                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    101101            if (length > 1) {
    102102                char[] chars = new char[length];
     
    116116        new Primitive("char-not-greaterp") {
    117117        public LispObject execute(LispObject first, LispObject second)
    118             throws LispError
     118            throws ConditionThrowable
    119119        {
    120120            char c1 = Character.toUpperCase(LispCharacter.getValue(first));
     
    122122            return c1 <= c2 ? T : NIL;
    123123        }
    124         public LispObject execute(LispObject[] array) throws LispError
     124        public LispObject execute(LispObject[] array) throws ConditionThrowable
    125125        {
    126126            final int length = array.length;
    127127            if (length == 0)
    128                 throw new WrongNumberOfArgumentsException(this);
     128                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    129129            if (length > 1) {
    130130                char[] chars = new char[length];
     
    144144        new Primitive("char-lessp") {
    145145        public LispObject execute(LispObject first, LispObject second)
    146             throws LispError
     146            throws ConditionThrowable
    147147        {
    148148            char c1 = Character.toUpperCase(LispCharacter.getValue(first));
     
    150150            return c1 < c2 ? T : NIL;
    151151        }
    152         public LispObject execute(LispObject[] array) throws LispError
     152        public LispObject execute(LispObject[] array) throws ConditionThrowable
    153153        {
    154154            final int length = array.length;
    155155            if (length == 0)
    156                 throw new WrongNumberOfArgumentsException(this);
     156                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    157157            if (length > 1) {
    158158                char[] chars = new char[length];
     
    172172        new Primitive("char-not-lessp") {
    173173        public LispObject execute(LispObject first, LispObject second)
    174             throws LispError
     174            throws ConditionThrowable
    175175        {
    176176            char c1 = Character.toUpperCase(LispCharacter.getValue(first));
     
    178178            return c1 >= c2 ? T : NIL;
    179179        }
    180         public LispObject execute(LispObject[] array) throws LispError
     180        public LispObject execute(LispObject[] array) throws ConditionThrowable
    181181        {
    182182            final int length = array.length;
    183183            if (length == 0)
    184                 throw new WrongNumberOfArgumentsException(this);
     184                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    185185            if (length > 1) {
    186186                char[] chars = new char[length];
  • trunk/j/src/org/armedbear/lisp/CharacterInputStream.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CharacterInputStream.java,v 1.46 2003-09-19 00:05:09 piso Exp $
     5 * $Id: CharacterInputStream.java,v 1.47 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    137137    }
    138138
    139     private LispString readString() throws LispError
     139    private LispString readString() throws ConditionThrowable
    140140    {
    141141        try {
     
    233233    }
    234234
    235     private LispObject readRightParen() throws LispError
     235    private LispObject readRightParen() throws ConditionThrowable
    236236    {
    237237        throw new LispError("unmatched right parenthesis");
    238238    }
    239239
    240     private LispObject readComment() throws LispError
     240    private LispObject readComment() throws ConditionThrowable
    241241    {
    242242        try {
     
    414414    }
    415415
    416     private Symbol readUninternedSymbol() throws LispError
     416    private Symbol readUninternedSymbol() throws ConditionThrowable
    417417    {
    418418        try {
     
    482482    }
    483483
    484     private LispObject readBitVector() throws LispError
     484    private LispObject readBitVector() throws ConditionThrowable
    485485    {
    486486        try {
     
    569569    }
    570570
    571     private LispObject readToken(char firstChar) throws LispError
     571    private LispObject readToken(char firstChar) throws ConditionThrowable
    572572    {
    573573        try {
     
    596596    }
    597597
    598     private LispObject makeObject(String token) throws LispError
     598    private LispObject makeObject(String token) throws ConditionThrowable
    599599    {
    600600        final LispThread thread = LispThread.currentThread();
     
    647647    }
    648648
    649     private LispObject makeNumber(String token) throws LispError
     649    private LispObject makeNumber(String token) throws ConditionThrowable
    650650    {
    651651        if (token.indexOf('/') >= 0)
     
    675675    }
    676676
    677     private LispObject makeRatio(String token) throws LispError
     677    private LispObject makeRatio(String token) throws ConditionThrowable
    678678    {
    679679        final int index = token.indexOf('/');
     
    689689    }
    690690
    691     private LispObject makeFloat(String token) throws LispError
     691    private LispObject makeFloat(String token) throws ConditionThrowable
    692692    {
    693693        final int length = token.length();
     
    732732    }
    733733
    734     private LispObject readBinary() throws LispError
     734    private LispObject readBinary() throws ConditionThrowable
    735735    {
    736736        try {
     
    766766    }
    767767
    768     private LispObject readHex() throws LispError
     768    private LispObject readHex() throws ConditionThrowable
    769769    {
    770770        try {
     
    804804    }
    805805
    806     private char flushWhitespace() throws LispError
     806    private char flushWhitespace() throws ConditionThrowable
    807807    {
    808808        try {
     
    825825    // recursive-p is ignored
    826826    public LispObject readLine(boolean eofError, LispObject eofValue)
    827         throws LispError
     827        throws ConditionThrowable
    828828    {
    829829        StringBuffer sb = new StringBuffer();
     
    864864    // recursive-p is ignored
    865865    public LispObject readChar(boolean eofError, LispObject eofValue)
    866         throws LispError
     866        throws ConditionThrowable
    867867    {
    868868        int n;
     
    883883
    884884    // unread-char character &optional input-stream => nil
    885     public LispObject unreadChar(LispCharacter c) throws LispError
     885    public LispObject unreadChar(LispCharacter c) throws ConditionThrowable
    886886    {
    887887        try {
     
    895895
    896896    // clear-input &optional input-stream => nil
    897     public LispObject clearInput() throws LispError
     897    public LispObject clearInput() throws ConditionThrowable
    898898    {
    899899        try {
  • trunk/j/src/org/armedbear/lisp/Closure.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Closure.java,v 1.54 2003-09-19 00:05:09 piso Exp $
     5 * $Id: Closure.java,v 1.55 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5757
    5858    public Closure(LispObject lambdaList, LispObject body, Environment env)
    59         throws LispError
     59        throws ConditionThrowable
    6060    {
    6161        this(null, lambdaList, body, env);
     
    6464    public Closure(String name, LispObject lambdaList, LispObject body,
    6565                   Environment env)
    66         throws LispError
     66        throws ConditionThrowable
    6767    {
    6868        super(name, getCurrentPackage());
     
    260260
    261261    private static final void invalidParameter(LispObject obj)
    262         throws LispError
     262        throws ConditionThrowable
    263263    {
    264264        throw new LispError(String.valueOf(obj) +
     
    266266    }
    267267
    268     public LispObject typep(LispObject typeSpecifier) throws LispError
     268    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    269269    {
    270270        if (typeSpecifier == Symbol.COMPILED_FUNCTION)
     
    455455            // Fixed arity.
    456456            if (args.length != arity)
    457                 throw new WrongNumberOfArgumentsException(this);
     457                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    458458            return args;
    459459        }
    460460        // Not fixed arity.
    461461        if (args.length < minArgs)
    462             throw new WrongNumberOfArgumentsException(this);
     462            throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    463463        Environment oldDynEnv = thread.getDynamicEnvironment();
    464464        Environment ext = new Environment(environment);
     
    529529            } else {
    530530                if ((argsLeft % 2) != 0)
    531                     throw new ProgramError("odd number of keyword arguments");
     531                    throw new ConditionThrowable(new ProgramError("odd number of keyword arguments"));
    532532                LispObject[] valueArray = new LispObject[keywordParameters.length];
    533533                boolean[] boundpArray = new boolean[keywordParameters.length];
     
    567567                    if (!allowOtherKeys &&
    568568                        (allowOtherKeysValue == null || allowOtherKeysValue == NIL))
    569                         throw new ProgramError("unrecognized keyword argument " +
    570                                                unrecognizedKeyword);
     569                        throw new ConditionThrowable(new ProgramError("unrecognized keyword argument " +
     570                                                                      unrecognizedKeyword));
    571571                }
    572572                for (int n = 0; n < keywordParameters.length; n++) {
     
    599599            if (argsUsed < args.length) {
    600600                if (restVar == null) {
    601                     throw new WrongNumberOfArgumentsException(this);
     601                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    602602                }
    603603            }
     
    663663            }
    664664        }
    665         catch (LispError e) {
    666             Debug.trace(e);
     665        catch (ConditionThrowable t) {
     666            Debug.trace(t);
    667667        }
    668668        sb.append('>');
     
    699699        public Parameter(Symbol var, LispObject initForm, LispObject svar,
    700700                         int type)
    701             throws LispError
     701            throws ConditionThrowable
    702702        {
    703703            this.var = var;
     
    711711        public Parameter(Symbol keyword, Symbol var, LispObject initForm,
    712712                         LispObject svar)
    713             throws LispError
     713            throws ConditionThrowable
    714714        {
    715715            this.var = var;
  • trunk/j/src/org/armedbear/lisp/CompiledFunction.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CompiledFunction.java,v 1.10 2003-09-19 00:05:09 piso Exp $
     5 * $Id: CompiledFunction.java,v 1.11 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2626    public CompiledFunction(String name, LispObject lambdaList,
    2727                            LispObject body, Environment env)
    28         throws LispError
     28        throws ConditionThrowable
    2929    {
    3030        super(name, lambdaList, body, env);
    3131    }
    3232
    33     public LispObject typep(LispObject typeSpecifier) throws LispError
     33    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    3434    {
    3535        if (typeSpecifier == Symbol.COMPILED_FUNCTION)
     
    8484        public LispObject execute(LispObject first, LispObject second,
    8585                                  LispObject third)
    86             throws LispError
     86            throws ConditionThrowable
    8787        {
    8888            String name;
     
    101101    private static final Primitive1 LOAD_COMPILED_FUNCTION =
    102102        new Primitive1("load-compiled-function", PACKAGE_SYS, false) {
    103         public LispObject execute(LispObject arg) throws LispError
     103        public LispObject execute(LispObject arg) throws ConditionThrowable
    104104        {
    105105            String className = ((LispString)arg).getValue();
     
    132132    private static final Primitive1 VARLIST =
    133133        new Primitive1("varlist", PACKAGE_SYS, false) {
    134         public LispObject execute(LispObject arg) throws LispError {
     134        public LispObject execute(LispObject arg) throws ConditionThrowable {
    135135            if (arg instanceof CompiledFunction)
    136136                return ((CompiledFunction)arg).getVariableList();
  • trunk/j/src/org/armedbear/lisp/Complex.java

    r3842 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Complex.java,v 1.21 2003-09-17 15:01:59 piso Exp $
     5 * $Id: Complex.java,v 1.22 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7272    }
    7373
    74     public LispObject typep(LispObject typeSpecifier) throws LispError
     74    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    7575    {
    7676        if (typeSpecifier == Symbol.COMPLEX)
     
    111111    }
    112112
    113     public boolean equalp(LispObject obj) throws LispError
     113    public boolean equalp(LispObject obj) throws ConditionThrowable
    114114    {
    115115        return isEqualTo(obj);
    116116    }
    117117
    118     public final LispObject incr() throws LispError
     118    public final LispObject incr() throws ConditionThrowable
    119119    {
    120120        return new Complex(realpart.add(Fixnum.ONE), imagpart);
    121121    }
    122122
    123     public final LispObject decr() throws LispError
     123    public final LispObject decr() throws ConditionThrowable
    124124    {
    125125        return new Complex(realpart.subtract(Fixnum.ONE), imagpart);
    126126    }
    127127
    128     public LispObject add(LispObject obj) throws LispError
     128    public LispObject add(LispObject obj) throws ConditionThrowable
    129129    {
    130130        if (obj instanceof Complex) {
     
    135135    }
    136136
    137     public LispObject subtract(LispObject obj) throws LispError
     137    public LispObject subtract(LispObject obj) throws ConditionThrowable
    138138    {
    139139        if (obj instanceof Complex) {
     
    144144    }
    145145
    146     public LispObject multiplyBy(LispObject obj) throws LispError
     146    public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
    147147    {
    148148        if (obj instanceof Complex) {
     
    163163    }
    164164
    165     public LispObject divideBy(LispObject obj) throws LispError
     165    public LispObject divideBy(LispObject obj) throws ConditionThrowable
    166166    {
    167167        if (obj instanceof Complex) {
     
    182182    }
    183183
    184     public boolean isEqualTo(LispObject obj) throws LispError
     184    public boolean isEqualTo(LispObject obj) throws ConditionThrowable
    185185    {
    186186        if (obj instanceof Complex) {
     
    204204    }
    205205
    206     public boolean isNotEqualTo(LispObject obj) throws LispError
     206    public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
    207207    {
    208208        return !isEqualTo(obj);
  • trunk/j/src/org/armedbear/lisp/Condition.java

    r3872 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Condition.java,v 1.3 2003-09-19 00:17:03 piso Exp $
     5 * $Id: Condition.java,v 1.4 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3434    }
    3535
    36     public LispObject typep(LispObject type) throws LispError
     36    public LispObject typep(LispObject type) throws ConditionThrowable
    3737    {
    3838        if (type == Symbol.CONDITION)
  • trunk/j/src/org/armedbear/lisp/Cons.java

    r3841 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Cons.java,v 1.26 2003-09-17 14:59:50 piso Exp $
     5 * $Id: Cons.java,v 1.27 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5151    }
    5252
    53     public LispObject typep(LispObject typeSpecifier) throws LispError
     53    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    5454    {
    5555        if (typeSpecifier == Symbol.LIST)
     
    110110    }
    111111
    112     public final LispObject cadr() throws LispError
     112    public final LispObject cadr() throws ConditionThrowable
    113113    {
    114114        return cdr.car();
    115115    }
    116116
    117     public final LispObject cddr() throws LispError
     117    public final LispObject cddr() throws ConditionThrowable
    118118    {
    119119        return cdr.cdr();
    120120    }
    121121
    122     public final boolean equal(LispObject obj) throws LispError
     122    public final boolean equal(LispObject obj) throws ConditionThrowable
    123123    {
    124124        if (this == obj)
     
    131131    }
    132132
    133     public final boolean equalp(LispObject obj) throws LispError
     133    public final boolean equalp(LispObject obj) throws ConditionThrowable
    134134    {
    135135        if (this == obj)
     
    142142    }
    143143
    144     public final int length() throws LispError
     144    public final int length() throws ConditionThrowable
    145145    {
    146146        int length = 0;
     
    158158    }
    159159
    160     public LispObject elt(int index) throws LispError
     160    public LispObject elt(int index) throws ConditionThrowable
    161161    {
    162162        if (index < 0) {
     
    198198    }
    199199
    200     public LispObject remove(LispObject item) throws LispError
     200    public LispObject remove(LispObject item) throws ConditionThrowable
    201201    {
    202202        LispObject result = NIL;
     
    218218    }
    219219
    220     public final LispObject[] copyToArray() throws LispError
     220    public final LispObject[] copyToArray() throws ConditionThrowable
    221221    {
    222222        final int length = length();
  • trunk/j/src/org/armedbear/lisp/DisplacedArray.java

    r3848 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: DisplacedArray.java,v 1.10 2003-09-17 18:01:17 piso Exp $
     5 * $Id: DisplacedArray.java,v 1.11 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5757    }
    5858
    59     public LispObject typep(LispObject type) throws LispError
     59    public LispObject typep(LispObject type) throws ConditionThrowable
    6060    {
    6161        if (type == Symbol.VECTOR || type == LispClass.VECTOR)
     
    8787    }
    8888
    89     public int length() throws LispError
     89    public int length() throws ConditionThrowable
    9090    {
    9191        if (dimv.length == 1)
     
    9494    }
    9595
    96     public LispObject elt(int index) throws LispError
     96    public LispObject elt(int index) throws ConditionThrowable
    9797    {
    9898        if (dimv.length == 1)
     
    101101    }
    102102
    103     public LispObject AREF(LispObject index) throws LispError
     103    public LispObject AREF(LispObject index) throws ConditionThrowable
    104104    {
    105105        if (dimv.length == 1)
     
    108108        sb.append("wrong number of subscripts (1) for array of rank ");
    109109        sb.append(getRank());
    110         throw new ProgramError(sb.toString());
     110        throw new ConditionThrowable(new ProgramError(sb.toString()));
    111111    }
    112112
     
    124124    }
    125125
    126     public int getDimension(int n) throws LispError
     126    public int getDimension(int n) throws ConditionThrowable
    127127    {
    128128        try {
     
    144144    }
    145145
    146     public LispObject getRowMajor(int index) throws LispError
     146    public LispObject getRowMajor(int index) throws ConditionThrowable
    147147    {
    148148        if (index >= 0 && index < size)
     
    151151    }
    152152
    153     public void setRowMajor(int index, LispObject newValue) throws LispError
     153    public void setRowMajor(int index, LispObject newValue) throws ConditionThrowable
    154154    {
    155155        if (index >= 0 && index < size)
     
    162162    private static final Primitive1 ARRAY_DISPLACEMENT =
    163163        new Primitive1("array-displacement") {
    164         public LispObject execute(LispObject arg) throws LispError
     164        public LispObject execute(LispObject arg) throws ConditionThrowable
    165165        {
    166166            AbstractArray array = checkArray(arg);
  • trunk/j/src/org/armedbear/lisp/Environment.java

    r2512 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Environment.java,v 1.5 2003-06-21 18:49:13 piso Exp $
     5 * $Id: Environment.java,v 1.6 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    8585    }
    8686
    87     public LispObject lookupFunctional(LispObject symbol) throws LispError
     87    public LispObject lookupFunctional(LispObject symbol) throws ConditionThrowable
    8888    {
    8989        Binding binding = lastFunctionalBinding;
  • trunk/j/src/org/armedbear/lisp/Extensions.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Extensions.java,v 1.8 2003-09-19 00:05:09 piso Exp $
     5 * $Id: Extensions.java,v 1.9 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5151        new Primitive2("make-socket", PACKAGE_EXT, true) {
    5252        public LispObject execute(LispObject first, LispObject second)
    53             throws LispError
     53            throws ConditionThrowable
    5454        {
    5555            String host = LispString.getValue(first);
  • trunk/j/src/org/armedbear/lisp/FillPointerOutputStream.java

    r3316 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: FillPointerOutputStream.java,v 1.1 2003-08-10 17:46:39 piso Exp $
     5 * $Id: FillPointerOutputStream.java,v 1.2 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3636    private static final Primitive1 MAKE_FILL_POINTER_OUTPUT_STREAM =
    3737        new Primitive1("make-fill-pointer-output-stream", PACKAGE_SYS, false) {
    38         public LispObject execute(LispObject arg) throws LispError
     38        public LispObject execute(LispObject arg) throws ConditionThrowable
    3939        {
    4040            LispString string = checkString(arg);
  • trunk/j/src/org/armedbear/lisp/Fixnum.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Fixnum.java,v 1.69 2003-09-19 00:05:09 piso Exp $
     5 * $Id: Fixnum.java,v 1.70 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5252    }
    5353
    54     public LispObject typep(LispObject type) throws LispError
     54    public LispObject typep(LispObject type) throws ConditionThrowable
    5555    {
    5656        if (type == Symbol.FIXNUM)
     
    179179    }
    180180
    181     public static int getValue(LispObject obj) throws LispError
     181    public static int getValue(LispObject obj) throws ConditionThrowable
    182182    {
    183183        try {
     
    189189    }
    190190
    191     public static int getInt(LispObject obj) throws LispError
     191    public static int getInt(LispObject obj) throws ConditionThrowable
    192192    {
    193193        try {
     
    199199    }
    200200
    201     public static BigInteger getBigInteger(LispObject obj) throws LispError
     201    public static BigInteger getBigInteger(LispObject obj) throws ConditionThrowable
    202202    {
    203203        try {
     
    209209    }
    210210
    211     public static float getFloat(LispObject obj) throws LispError
     211    public static float getFloat(LispObject obj) throws ConditionThrowable
    212212    {
    213213        try {
     
    243243    }
    244244
    245     public LispObject add(LispObject obj) throws LispError
     245    public LispObject add(LispObject obj) throws ConditionThrowable
    246246    {
    247247        if (obj instanceof Fixnum)
     
    265265    }
    266266
    267     public LispObject subtract(LispObject obj) throws LispError
     267    public LispObject subtract(LispObject obj) throws ConditionThrowable
    268268    {
    269269        if (obj instanceof Fixnum)
     
    288288    }
    289289
    290     public LispObject multiplyBy(LispObject obj) throws LispError
     290    public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
    291291    {
    292292        if (obj instanceof Fixnum)
     
    311311    }
    312312
    313     public LispObject divideBy(LispObject obj) throws LispError
     313    public LispObject divideBy(LispObject obj) throws ConditionThrowable
    314314    {
    315315        try {
     
    349349    }
    350350
    351     public boolean isEqualTo(LispObject obj) throws LispError
     351    public boolean isEqualTo(LispObject obj) throws ConditionThrowable
    352352    {
    353353        if (obj instanceof Fixnum)
     
    362362    }
    363363
    364     public boolean isNotEqualTo(LispObject obj) throws LispError
     364    public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
    365365    {
    366366        if (obj instanceof Fixnum)
     
    376376    }
    377377
    378     public boolean isLessThan(LispObject obj) throws LispError
     378    public boolean isLessThan(LispObject obj) throws ConditionThrowable
    379379    {
    380380        if (obj instanceof Fixnum)
     
    392392    }
    393393
    394     public boolean isGreaterThan(LispObject obj) throws LispError
     394    public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
    395395    {
    396396        if (obj instanceof Fixnum)
     
    408408    }
    409409
    410     public boolean isLessThanOrEqualTo(LispObject obj) throws LispError
     410    public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
    411411    {
    412412        if (obj instanceof Fixnum)
     
    424424    }
    425425
    426     public boolean isGreaterThanOrEqualTo(LispObject obj) throws LispError
     426    public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
    427427    {
    428428        if (obj instanceof Fixnum)
  • trunk/j/src/org/armedbear/lisp/Function.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Function.java,v 1.22 2003-09-19 00:05:10 piso Exp $
     5 * $Id: Function.java,v 1.23 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7474                    pkg.export(symbol);
    7575                }
    76                 catch (LispError e) {
     76                catch (ConditionThrowable t) {
    7777                    Debug.assertTrue(false);
    7878                }
     
    8282                    symbol.setFunctionDocumentation(docstring);
    8383                }
    84                 catch (LispError e) {
     84                catch (ConditionThrowable t) {
    8585                    Debug.assertTrue(false);
    8686                }
     
    107107    }
    108108
    109     public LispObject typep(LispObject typeSpecifier) throws LispError
     109    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    110110    {
    111111        if (typeSpecifier == Symbol.FUNCTION)
     
    138138        if (module != null)
    139139            return module.dispatch(args, index);
    140         throw new WrongNumberOfArgumentsException(name);
     140        throw new ConditionThrowable(new WrongNumberOfArgumentsException(name));
    141141    }
    142142
  • trunk/j/src/org/armedbear/lisp/HashTable.java

    r3845 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: HashTable.java,v 1.17 2003-09-17 15:12:41 piso Exp $
     5 * $Id: HashTable.java,v 1.18 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4545    private HashTable(LispObject test, int size, LispObject rehashSize,
    4646                      LispObject rehashThreshold)
    47         throws LispError
     47        throws ConditionThrowable
    4848    {
    4949        if (test == NIL || test == Symbol.EQ.getSymbolFunction())
     
    7272    }
    7373
    74     public LispObject typep(LispObject typeSpecifier) throws LispError
     74    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    7575    {
    7676        if (typeSpecifier == Symbol.HASH_TABLE)
     
    8484    public synchronized LispObject gethash(LispObject key,
    8585                                           LispObject defaultValue)
    86         throws LispError
     86        throws ConditionThrowable
    8787    {
    8888        LispObject[] values = new LispObject[2];
     
    9999
    100100    public synchronized LispObject puthash(LispObject key, LispObject newValue)
    101         throws LispError
     101        throws ConditionThrowable
    102102    {
    103103        put(key, newValue);
     
    106106
    107107    // remhash key hash-table => generalized-boolean
    108     public synchronized LispObject remhash(LispObject key) throws LispError
     108    public synchronized LispObject remhash(LispObject key) throws ConditionThrowable
    109109    {
    110110        // A value in a Lisp hash table can never be null, so...
     
    140140    }
    141141
    142     public LispObject get(LispObject key) throws LispError
     142    public LispObject get(LispObject key) throws ConditionThrowable
    143143    {
    144144        int idx = hash(key);
     
    152152    }
    153153
    154     public LispObject put(LispObject key, LispObject value) throws LispError
     154    public LispObject put(LispObject key, LispObject value) throws ConditionThrowable
    155155    {
    156156        int idx = hash(key);
     
    176176    }
    177177
    178     public LispObject remove(LispObject key) throws LispError
     178    public LispObject remove(LispObject key) throws ConditionThrowable
    179179    {
    180180        int idx = hash(key);
     
    201201    }
    202202
    203     private final boolean equals(LispObject o1, LispObject o2) throws LispError
     203    private final boolean equals(LispObject o1, LispObject o2) throws ConditionThrowable
    204204    {
    205205        switch (test) {
     
    277277    private static final Primitive _MAKE_HASH_TABLE =
    278278        new Primitive("%make-hash-table", PACKAGE_SYS, false) {
    279         public LispObject execute(LispObject[] args) throws LispError
     279        public LispObject execute(LispObject[] args) throws ConditionThrowable
    280280        {
    281281            if (args.length != 4)
    282                 throw new WrongNumberOfArgumentsException(this);
     282                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    283283            LispObject test = args[0];
    284284            int size = Fixnum.getValue(args[1]);
     
    292292    // gethash key hash-table &optional default => value, present-p
    293293    private static final Primitive GETHASH = new Primitive("gethash") {
    294         public LispObject execute(LispObject[] args) throws LispError
     294        public LispObject execute(LispObject[] args) throws ConditionThrowable
    295295        {
    296296            final int length = args.length;
    297297            if (length < 2 || length > 3)
    298                 throw new WrongNumberOfArgumentsException(this);
     298                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    299299            if (args[1] instanceof HashTable) {
    300300                LispObject key = args[0];
     
    312312    private static final Primitive PUTHASH =
    313313        new Primitive("puthash", PACKAGE_SYS, false) {
    314         public LispObject execute(LispObject[] args) throws LispError
     314        public LispObject execute(LispObject[] args) throws ConditionThrowable
    315315        {
    316316            final int length = args.length;
    317317            if (length < 3 || length > 4)
    318                 throw new WrongNumberOfArgumentsException(this);
     318                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    319319            if (args[1] instanceof HashTable) {
    320320                LispObject key = args[0];
     
    336336    private static final Primitive2 REMHASH = new Primitive2("remhash") {
    337337        public LispObject execute(LispObject first, LispObject second)
    338             throws LispError
     338            throws ConditionThrowable
    339339        {
    340340            if (second instanceof HashTable) {
     
    350350    // sxhash object => hash-code
    351351    private static final Primitive1 SXHASH = new Primitive1("sxhash") {
    352         public LispObject execute(LispObject arg) throws LispError
     352        public LispObject execute(LispObject arg) throws ConditionThrowable
    353353        {
    354354            return new Fixnum(arg.hashCode());
     
    359359    private static final Primitive1 HASH_TABLE_P =
    360360        new Primitive1("hash-table-p") {
    361         public LispObject execute(LispObject arg) throws LispError
     361        public LispObject execute(LispObject arg) throws ConditionThrowable
    362362        {
    363363            return arg instanceof HashTable ? T : NIL;
     
    368368    private static final Primitive1 HASH_TABLE_ENTRIES =
    369369        new Primitive1("hash-table-entries", PACKAGE_SYS, false) {
    370         public LispObject execute(LispObject arg) throws LispError
     370        public LispObject execute(LispObject arg) throws ConditionThrowable
    371371        {
    372372            if (arg instanceof HashTable)
  • trunk/j/src/org/armedbear/lisp/Interpreter.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Interpreter.java,v 1.31 2003-09-19 00:05:10 piso Exp $
     5 * $Id: Interpreter.java,v 1.32 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    232232    // character.
    233233    private char peekCharNonWhitespace(CharacterInputStream stream)
    234         throws LispError
     234        throws ConditionThrowable
    235235    {
    236236        while (true) {
     
    245245    }
    246246
    247     private static Object getHistory(String s) throws LispError
     247    private static Object getHistory(String s) throws ConditionThrowable
    248248    {
    249249        s = s.trim();
  • trunk/j/src/org/armedbear/lisp/Java.java

    r1528 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Java.java,v 1.7 2003-04-03 18:36:08 piso Exp $
     5 * $Id: Java.java,v 1.8 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3232    private static final Primitive1 JCLASS =
    3333        new Primitive1("jclass", PACKAGE_JAVA) {
    34         public LispObject execute(LispObject arg) throws LispError
     34        public LispObject execute(LispObject arg) throws ConditionThrowable
    3535        {
    3636            try {
     
    5050    private static final Primitive JCONSTRUCTOR =
    5151        new Primitive("jconstructor", PACKAGE_JAVA) {
    52         public LispObject execute(LispObject[] args) throws LispError
     52        public LispObject execute(LispObject[] args) throws ConditionThrowable
    5353        {
    5454            if (args.length < 1)
    55                 throw new WrongNumberOfArgumentsException(this);
     55                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5656            String className = LispString.getValue(args[0]);
    5757            try {
     
    8080    private static final Primitive JMETHOD =
    8181        new Primitive("jmethod", PACKAGE_JAVA) {
    82         public LispObject execute(LispObject[] args) throws LispError
     82        public LispObject execute(LispObject[] args) throws ConditionThrowable
    8383        {
    8484            if (args.length < 2)
    85                 throw new WrongNumberOfArgumentsException(this);
     85                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    8686            String className = LispString.getValue(args[0]);
    8787            String methodName = LispString.getValue(args[1]);
     
    131131    private static final Primitive JSTATIC =
    132132        new Primitive("jstatic", PACKAGE_JAVA) {
    133         public LispObject execute(LispObject[] args) throws LispError
     133        public LispObject execute(LispObject[] args) throws ConditionThrowable
    134134        {
    135135            if (args.length < 2)
    136                 throw new WrongNumberOfArgumentsException(this);
     136                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    137137            try {
    138138                Method m = null;
     
    191191    // jnew constructor &rest args
    192192    private static final Primitive JNEW = new Primitive("jnew", PACKAGE_JAVA) {
    193         public LispObject execute(LispObject[] args) throws LispError
     193        public LispObject execute(LispObject[] args) throws ConditionThrowable
    194194        {
    195195            if (args.length < 1)
    196                 throw new WrongNumberOfArgumentsException(this);
     196                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    197197            LispObject classRef = args[0];
    198198            try {
     
    217217    // jcall method instance &rest args
    218218    private static final Primitive JCALL = new Primitive("jcall", PACKAGE_JAVA) {
    219         public LispObject execute(LispObject[] args) throws LispError
     219        public LispObject execute(LispObject[] args) throws ConditionThrowable
    220220        {
    221221            if (args.length < 2)
    222                 throw new WrongNumberOfArgumentsException(this);
     222                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    223223            try {
    224224                Method method = (Method) JavaObject.getObject(args[0]);
     
    270270    }
    271271
    272     private static final LispObject makeLispObject(Object obj) throws LispError
     272    private static final LispObject makeLispObject(Object obj) throws ConditionThrowable
    273273    {
    274274        if (obj == null)
  • trunk/j/src/org/armedbear/lisp/Lisp.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Lisp.java,v 1.133 2003-09-19 00:05:10 piso Exp $
     5 * $Id: Lisp.java,v 1.134 2003-09-19 01:46:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5050            PACKAGE_EXT.usePackage(PACKAGE_CL);
    5151        }
    52         catch (LispError e) {
    53             e.printStackTrace();
     52        catch (Throwable t) {
     53            t.printStackTrace();
    5454        }
    5555    }
     
    348348                    return closure.execute(evalList(args, env, thread));
    349349                } else
    350                     throw new ProgramError("illegal function object: " + first);
     350                    throw new ConditionThrowable(new ProgramError("illegal function object: " + first));
    351351            }
    352352        } else
     
    452452    }
    453453
    454     public static Symbol checkSymbol(LispObject obj) throws LispError
     454    public static Symbol checkSymbol(LispObject obj) throws ConditionThrowable
    455455    {
    456456        if (obj == null)
     
    464464    }
    465465
    466     public static final Cons checkCons(LispObject obj) throws LispError
     466    public static final Cons checkCons(LispObject obj) throws ConditionThrowable
    467467    {
    468468        if (obj == null)
     
    477477
    478478    public static final LispObject checkList(LispObject obj)
    479         throws LispError
     479        throws ConditionThrowable
    480480    {
    481481        if (obj == null)
     
    487487
    488488    public static final AbstractArray checkArray(LispObject obj)
    489         throws LispError
     489        throws ConditionThrowable
    490490    {
    491491        if (obj == null)
     
    500500
    501501    public static final AbstractVector checkVector(LispObject obj)
    502         throws LispError
     502        throws ConditionThrowable
    503503    {
    504504        if (obj == null)
     
    513513
    514514    public static final LispString checkString(LispObject obj)
    515         throws LispError
     515        throws ConditionThrowable
    516516    {
    517517        if (obj == null)
     
    525525    }
    526526
    527     public static final LispString string(LispObject arg) throws LispError
     527    public static final LispString string(LispObject arg) throws ConditionThrowable
    528528    {
    529529        if (arg instanceof LispString)
     
    537537    }
    538538
    539     public static final String javaString(LispObject arg) throws LispError
     539    public static final String javaString(LispObject arg) throws ConditionThrowable
    540540    {
    541541        if (arg instanceof LispString)
     
    561561    public static final LispObject number(BigInteger numerator,
    562562                                          BigInteger denominator)
    563         throws LispError
     563        throws ConditionThrowable
    564564    {
    565565        if (denominator.signum() == 0)
     
    647647
    648648    public static final LispCharacter checkCharacter(LispObject obj)
    649         throws LispError
     649        throws ConditionThrowable
    650650    {
    651651        if (obj == null)
     
    660660
    661661    public static final Package checkPackage(LispObject obj)
    662         throws LispError
     662        throws ConditionThrowable
    663663    {
    664664        if (obj == null)
     
    673673
    674674    public static final Function checkFunction(LispObject obj)
    675         throws LispError
     675        throws ConditionThrowable
    676676    {
    677677        if (obj == null)
     
    686686
    687687    public static final LispStream checkStream(LispObject obj)
    688         throws LispError
     688        throws ConditionThrowable
    689689    {
    690690        if (obj == null)
     
    699699
    700700    public static final CharacterInputStream checkInputStream(LispObject obj)
    701         throws LispError
     701        throws ConditionThrowable
    702702    {
    703703        if (obj == null)
     
    711711
    712712    public static final CharacterOutputStream checkOutputStream(LispObject obj)
    713         throws LispError
     713        throws ConditionThrowable
    714714    {
    715715        if (obj == null)
     
    723723
    724724    public static final Readtable checkReadtable(LispObject obj)
    725         throws LispError
     725        throws ConditionThrowable
    726726    {
    727727        if (obj == null)
     
    736736
    737737    public static final Environment checkEnvironment(LispObject obj)
    738         throws LispError
     738        throws ConditionThrowable
    739739    {
    740740        if (obj == null)
     
    749749
    750750    public static final Function coerceToFunction(LispObject obj)
    751         throws LispError
     751        throws ConditionThrowable
    752752    {
    753753        if (obj instanceof Function)
     
    764764    // Returns package or throws exception.
    765765    public static final Package coerceToPackage(LispObject obj)
    766         throws LispError
     766        throws ConditionThrowable
    767767    {
    768768        if (obj instanceof Package)
     
    777777    public static final LispObject get(Symbol symbol, LispObject indicator,
    778778                                       LispObject defaultValue)
    779         throws LispError
     779        throws ConditionThrowable
    780780    {
    781781        LispObject result = get(symbol, indicator);
     
    785785    // Returns null if there is no property with the specified indicator.
    786786    public static final LispObject get(Symbol symbol, LispObject indicator)
    787         throws LispError
     787        throws ConditionThrowable
    788788    {
    789789        LispObject list = checkList(symbol.getPropertyList());
     
    799799    public static final LispObject put(Symbol symbol, LispObject indicator,
    800800                                       LispObject value)
    801         throws LispError
     801        throws ConditionThrowable
    802802    {
    803803        LispObject list = checkList(symbol.getPropertyList());
     
    825825    // Used by jvm compiler.
    826826    public static final Symbol internInPackage(String name, String packageName)
    827         throws LispError
     827        throws ConditionThrowable
    828828    {
    829829        Package pkg = Packages.findPackage(packageName);
     
    839839            pkg.export(symbol); // FIXME Inefficient!
    840840        }
    841         catch (LispError e) {
    842             Debug.trace(e);
     841        catch (ConditionThrowable t) {
     842            Debug.trace(t);
    843843        }
    844844        return symbol;
     
    861861            pkg.export(symbol); // FIXME Inefficient!
    862862        }
    863         catch (LispError e) {
    864             Debug.trace(e);
     863        catch (ConditionThrowable t) {
     864            Debug.trace(t);
    865865        }
    866866        symbol.setSpecial(true);
     
    876876            pkg.export(symbol); // FIXME Inefficient!
    877877        }
    878         catch (LispError e) {
    879             Debug.trace(e);
     878        catch (ConditionThrowable t) {
     879            Debug.trace(t);
    880880        }
    881881        symbol.setConstant(true);
     
    937937    }
    938938
    939     public static final CharacterOutputStream getStandardOutput() throws LispError
     939    public static final CharacterOutputStream getStandardOutput() throws ConditionThrowable
    940940    {
    941941        return checkOutputStream(_STANDARD_OUTPUT_.symbolValueNoThrow());
     
    975975    public static final Primitive0 DEBUG =
    976976        new Primitive0("%debug", PACKAGE_SYS, false) {
    977         public LispObject execute() throws LispError
     977        public LispObject execute() throws ConditionThrowable
    978978        {
    979979            debug = true;
     
    984984    public static final Primitive0 NODEBUG =
    985985        new Primitive0("%nodebug", PACKAGE_SYS, false) {
    986         public LispObject execute() throws LispError
     986        public LispObject execute() throws ConditionThrowable
    987987        {
    988988            final LispThread thread = LispThread.currentThread();
     
    10001000    public static final Primitive0 START_PROFILER =
    10011001        new Primitive0("start-profiler", PACKAGE_EXT, true) {
    1002         public LispObject execute() throws LispError
     1002        public LispObject execute() throws ConditionThrowable
    10031003        {
    10041004            CharacterOutputStream out = getStandardOutput();
     
    10301030    public static final Primitive0 STOP_PROFILER =
    10311031        new Primitive0("stop-profiler", PACKAGE_EXT, true) {
    1032         public LispObject execute() throws LispError
     1032        public LispObject execute() throws ConditionThrowable
    10331033        {
    10341034            CharacterOutputStream out = getStandardOutput();
  • trunk/j/src/org/armedbear/lisp/LispCharacter.java

    r3849 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispCharacter.java,v 1.24 2003-09-17 18:07:34 piso Exp $
     5 * $Id: LispCharacter.java,v 1.25 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5858    }
    5959
    60     public LispObject typep(LispObject type) throws LispError
     60    public LispObject typep(LispObject type) throws ConditionThrowable
    6161    {
    6262        if (type == Symbol.CHARACTER)
     
    114114    }
    115115
    116     public static char getValue(LispObject obj) throws LispError
     116    public static char getValue(LispObject obj) throws ConditionThrowable
    117117    {
    118118        try {
     
    169169
    170170    private static final Primitive1 CHARACTER = new Primitive1("character") {
    171         public LispObject execute(LispObject arg) throws LispError
     171        public LispObject execute(LispObject arg) throws ConditionThrowable
    172172        {
    173173            if (arg instanceof LispCharacter)
     
    188188    private static final Primitive1 WHITESPACEP =
    189189        new Primitive1("whitespacep", PACKAGE_SYS, false) {
    190         public LispObject execute(LispObject arg) throws LispError
     190        public LispObject execute(LispObject arg) throws ConditionThrowable
    191191        {
    192192            LispCharacter character = checkCharacter(arg);
  • trunk/j/src/org/armedbear/lisp/LispClass.java

    r3874 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: LispClass.java,v 1.13 2003-09-19 00:18:19 piso Exp $
     5 * $Id: LispClass.java,v 1.14 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    110110    // ### find-class
    111111    private static final Primitive FIND_CLASS = new Primitive("find-class") {
    112         public LispObject execute(LispObject[] args) throws LispError
     112        public LispObject execute(LispObject[] args) throws ConditionThrowable
    113113        {
    114114            if (args.length < 1)
    115                 throw new WrongNumberOfArgumentsException(this);
     115                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    116116            LispObject obj = (LispObject) map.get(checkSymbol(args[0]));
    117117            return obj != null ? obj : NIL;
     
    121121    // ### class-name
    122122    private static final Primitive1 CLASS_NAME = new Primitive1("class-name") {
    123         public LispObject execute(LispObject arg) throws LispError
     123        public LispObject execute(LispObject arg) throws ConditionThrowable
    124124        {
    125125            try {
  • trunk/j/src/org/armedbear/lisp/LispFloat.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: LispFloat.java,v 1.44 2003-09-19 00:05:10 piso Exp $
     5 * $Id: LispFloat.java,v 1.45 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4444    }
    4545
    46     public LispObject typep(LispObject typeSpecifier) throws LispError
     46    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    4747    {
    4848        if (typeSpecifier == Symbol.FLOAT)
     
    102102    }
    103103
    104     public boolean equalp(LispObject obj) throws LispError
     104    public boolean equalp(LispObject obj) throws ConditionThrowable
    105105    {
    106106        if (obj instanceof LispFloat)
     
    147147    }
    148148
    149     public static double getValue(LispObject obj) throws LispError
     149    public static double getValue(LispObject obj) throws ConditionThrowable
    150150    {
    151151        try {
     
    172172    }
    173173
    174     public LispObject add(LispObject obj) throws LispError
     174    public LispObject add(LispObject obj) throws ConditionThrowable
    175175    {
    176176        if (obj instanceof LispFloat)
     
    189189    }
    190190
    191     public LispObject subtract(LispObject obj) throws LispError
     191    public LispObject subtract(LispObject obj) throws ConditionThrowable
    192192    {
    193193        if (obj instanceof LispFloat)
     
    207207    }
    208208
    209     public LispObject multiplyBy(LispObject obj) throws LispError
     209    public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
    210210    {
    211211        if (obj instanceof LispFloat)
     
    220220    }
    221221
    222     public LispObject divideBy(LispObject obj) throws LispError
     222    public LispObject divideBy(LispObject obj) throws ConditionThrowable
    223223    {
    224224        if (obj.zerop())
     
    235235    }
    236236
    237     public boolean isEqualTo(LispObject obj) throws LispError
     237    public boolean isEqualTo(LispObject obj) throws ConditionThrowable
    238238    {
    239239        if (obj instanceof LispFloat)
     
    250250    }
    251251
    252     public boolean isNotEqualTo(LispObject obj) throws LispError
     252    public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
    253253    {
    254254        return !isEqualTo(obj);
    255255    }
    256256
    257     public boolean isLessThan(LispObject obj) throws LispError
     257    public boolean isLessThan(LispObject obj) throws ConditionThrowable
    258258    {
    259259        if (obj instanceof LispFloat)
     
    268268    }
    269269
    270     public boolean isGreaterThan(LispObject obj) throws LispError
     270    public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
    271271    {
    272272        if (obj instanceof LispFloat)
     
    281281    }
    282282
    283     public boolean isLessThanOrEqualTo(LispObject obj) throws LispError
     283    public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
    284284    {
    285285        if (obj instanceof LispFloat)
     
    294294    }
    295295
    296     public boolean isGreaterThanOrEqualTo(LispObject obj) throws LispError
     296    public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
    297297    {
    298298        if (obj instanceof LispFloat)
     
    374374    private static final Primitive1 INTEGER_DECODE_FLOAT =
    375375        new Primitive1("integer-decode-float") {
    376         public LispObject execute(LispObject arg) throws LispError
     376        public LispObject execute(LispObject arg) throws ConditionThrowable
    377377        {
    378378            if (arg instanceof LispFloat) {
     
    404404    private static final Primitive1 FLOAT_RADIX =
    405405        new Primitive1("float-radix") {
    406         public LispObject execute(LispObject arg) throws LispError
     406        public LispObject execute(LispObject arg) throws ConditionThrowable
    407407        {
    408408            if (arg instanceof LispFloat)
     
    416416    private static final Primitive1 FLOAT_DIGITS =
    417417        new Primitive1("float-digits") {
    418         public LispObject execute(LispObject arg) throws LispError
     418        public LispObject execute(LispObject arg) throws ConditionThrowable
    419419        {
    420420            if (arg instanceof LispFloat)
     
    440440    // float number &optional prototype => float
    441441    private static final Primitive FLOAT = new Primitive("float") {
    442         public LispObject execute(LispObject[] args) throws LispError
     442        public LispObject execute(LispObject[] args) throws ConditionThrowable
    443443        {
    444444            final int length = args.length;
    445445            if (length < 1 || length > 2)
    446                 throw new WrongNumberOfArgumentsException(this);
     446                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    447447            // FIXME Ignore prototype (args[1] if present).
    448448            return coerceToFloat(args[0]);
     
    453453    // floatp object => generalized-boolean
    454454    private static final Primitive1 FLOATP = new Primitive1("floatp") {
    455         public LispObject execute(LispObject arg) throws LispError
     455        public LispObject execute(LispObject arg) throws ConditionThrowable
    456456        {
    457457            return arg.FLOATP();
  • trunk/j/src/org/armedbear/lisp/LispObject.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispObject.java,v 1.56 2003-09-19 00:05:10 piso Exp $
     5 * $Id: LispObject.java,v 1.57 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3939    }
    4040
    41     public LispObject typep(LispObject typeSpecifier) throws LispError
     41    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    4242    {
    4343        if (typeSpecifier == T)
     
    7070    }
    7171
    72     public LispObject car() throws LispError
    73     {
    74         throw new TypeError(this, "list");
    75     }
    76 
    77     public void setCar(LispObject obj) throws LispError
     72    public LispObject car() throws ConditionThrowable
     73    {
     74        throw new TypeError(this, "list");
     75    }
     76
     77    public void setCar(LispObject obj) throws ConditionThrowable
    7878    {
    7979        throw new TypeError(this, "cons");
    8080    }
    8181
    82     public LispObject cdr() throws LispError
    83     {
    84         throw new TypeError(this, "list");
    85     }
    86 
    87     public void setCdr(LispObject obj) throws LispError
     82    public LispObject cdr() throws ConditionThrowable
     83    {
     84        throw new TypeError(this, "list");
     85    }
     86
     87    public void setCdr(LispObject obj) throws ConditionThrowable
    8888    {
    8989        throw new TypeError(this, "cons");
    9090    }
    9191
    92     public LispObject cadr() throws LispError
    93     {
    94         throw new TypeError(this, "list");
    95     }
    96 
    97     public LispObject cddr() throws LispError
     92    public LispObject cadr() throws ConditionThrowable
     93    {
     94        throw new TypeError(this, "list");
     95    }
     96
     97    public LispObject cddr() throws ConditionThrowable
    9898    {
    9999        throw new TypeError(this, "list");
     
    115115    }
    116116
    117     public boolean equal(LispObject obj) throws LispError
     117    public boolean equal(LispObject obj) throws ConditionThrowable
    118118    {
    119119        return this == obj;
    120120    }
    121121
    122     public boolean equalp(LispObject obj) throws LispError
     122    public boolean equalp(LispObject obj) throws ConditionThrowable
    123123    {
    124124        return this == obj;
     
    270270    }
    271271
    272     public int length() throws LispError
     272    public int length() throws ConditionThrowable
    273273    {
    274274        throw new TypeError(this, "sequence");
    275275    }
    276276
    277     public final LispObject LENGTH() throws LispError
     277    public final LispObject LENGTH() throws ConditionThrowable
    278278    {
    279279        return new Fixnum(length());
    280280    }
    281281
    282     public LispObject elt(int index) throws LispError
     282    public LispObject elt(int index) throws ConditionThrowable
    283283    {
    284284        throw new TypeError(this, "sequence");
    285285    }
    286286
    287     public LispObject AREF(LispObject index) throws LispError
     287    public LispObject AREF(LispObject index) throws ConditionThrowable
    288288    {
    289289        throw new TypeError(this, "array");
    290290    }
    291291
    292     public LispObject[] copyToArray() throws LispError
     292    public LispObject[] copyToArray() throws ConditionThrowable
    293293    {
    294294        throw new TypeError(this, "list");
     
    325325    }
    326326
    327     public LispObject getSymbolValue() throws LispError
     327    public LispObject getSymbolValue() throws ConditionThrowable
    328328    {
    329329        throw new TypeError(this, "symbol");
    330330    }
    331331
    332     public LispObject getSymbolFunction() throws LispError
     332    public LispObject getSymbolFunction() throws ConditionThrowable
    333333    {
    334334        throw new TypeError(this, "symbol");
    335335    }
    336336
    337     public LispObject getSymbolFunctionOrDie() throws LispError
     337    public LispObject getSymbolFunctionOrDie() throws ConditionThrowable
    338338    {
    339339        throw new TypeError(this, "symbol");
     
    384384    }
    385385
    386     public LispObject incr() throws LispError
    387     {
    388         throw new TypeError(this, "number");
    389     }
    390 
    391     public LispObject decr() throws LispError
    392     {
    393         throw new TypeError(this, "number");
    394     }
    395 
    396     public LispObject add(LispObject obj) throws LispError
    397     {
    398         throw new TypeError(this, "number");
    399     }
    400 
    401     public LispObject subtract(LispObject obj) throws LispError
    402     {
    403         throw new TypeError(this, "number");
    404     }
    405 
    406     public LispObject multiplyBy(LispObject obj) throws LispError
    407     {
    408         throw new TypeError(this, "number");
    409     }
    410 
    411     public LispObject divideBy(LispObject obj) throws LispError
    412     {
    413         throw new TypeError(this, "number");
    414     }
    415 
    416     public boolean isEqualTo(LispObject obj) throws LispError
    417     {
    418         throw new TypeError(this, "number");
    419     }
    420 
    421     public LispObject IS_E(LispObject obj) throws LispError
     386    public LispObject incr() throws ConditionThrowable
     387    {
     388        throw new TypeError(this, "number");
     389    }
     390
     391    public LispObject decr() throws ConditionThrowable
     392    {
     393        throw new TypeError(this, "number");
     394    }
     395
     396    public LispObject add(LispObject obj) throws ConditionThrowable
     397    {
     398        throw new TypeError(this, "number");
     399    }
     400
     401    public LispObject subtract(LispObject obj) throws ConditionThrowable
     402    {
     403        throw new TypeError(this, "number");
     404    }
     405
     406    public LispObject multiplyBy(LispObject obj) throws ConditionThrowable
     407    {
     408        throw new TypeError(this, "number");
     409    }
     410
     411    public LispObject divideBy(LispObject obj) throws ConditionThrowable
     412    {
     413        throw new TypeError(this, "number");
     414    }
     415
     416    public boolean isEqualTo(LispObject obj) throws ConditionThrowable
     417    {
     418        throw new TypeError(this, "number");
     419    }
     420
     421    public LispObject IS_E(LispObject obj) throws ConditionThrowable
    422422    {
    423423        return isEqualTo(obj) ? T : NIL;
    424424    }
    425425
    426     public boolean isNotEqualTo(LispObject obj) throws LispError
    427     {
    428         throw new TypeError(this, "number");
    429     }
    430 
    431     public LispObject IS_NE(LispObject obj) throws LispError
     426    public boolean isNotEqualTo(LispObject obj) throws ConditionThrowable
     427    {
     428        throw new TypeError(this, "number");
     429    }
     430
     431    public LispObject IS_NE(LispObject obj) throws ConditionThrowable
    432432    {
    433433        return isNotEqualTo(obj) ? T : NIL;
    434434    }
    435435
    436     public boolean isLessThan(LispObject obj) throws LispError
    437     {
    438         throw new TypeError(this, "number");
    439     }
    440 
    441     public LispObject IS_LT(LispObject obj) throws LispError
     436    public boolean isLessThan(LispObject obj) throws ConditionThrowable
     437    {
     438        throw new TypeError(this, "number");
     439    }
     440
     441    public LispObject IS_LT(LispObject obj) throws ConditionThrowable
    442442    {
    443443        return isLessThan(obj) ? T : NIL;
    444444    }
    445445
    446     public boolean isGreaterThan(LispObject obj) throws LispError
    447     {
    448         throw new TypeError(this, "number");
    449     }
    450 
    451     public LispObject IS_GT(LispObject obj) throws LispError
     446    public boolean isGreaterThan(LispObject obj) throws ConditionThrowable
     447    {
     448        throw new TypeError(this, "number");
     449    }
     450
     451    public LispObject IS_GT(LispObject obj) throws ConditionThrowable
    452452    {
    453453        return isGreaterThan(obj) ? T : NIL;
    454454    }
    455455
    456     public boolean isLessThanOrEqualTo(LispObject obj) throws LispError
    457     {
    458         throw new TypeError(this, "number");
    459     }
    460 
    461     public LispObject IS_LE(LispObject obj) throws LispError
     456    public boolean isLessThanOrEqualTo(LispObject obj) throws ConditionThrowable
     457    {
     458        throw new TypeError(this, "number");
     459    }
     460
     461    public LispObject IS_LE(LispObject obj) throws ConditionThrowable
    462462    {
    463463        return isLessThanOrEqualTo(obj) ? T : NIL;
    464464    }
    465465
    466     public boolean isGreaterThanOrEqualTo(LispObject obj) throws LispError
    467     {
    468         throw new TypeError(this, "number");
    469     }
    470 
    471     public LispObject IS_GE(LispObject obj) throws LispError
     466    public boolean isGreaterThanOrEqualTo(LispObject obj) throws ConditionThrowable
     467    {
     468        throw new TypeError(this, "number");
     469    }
     470
     471    public LispObject IS_GE(LispObject obj) throws ConditionThrowable
    472472    {
    473473        return isGreaterThanOrEqualTo(obj) ? T : NIL;
  • trunk/j/src/org/armedbear/lisp/LispStream.java

    r1751 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispStream.java,v 1.3 2003-05-10 14:57:25 piso Exp $
     5 * $Id: LispStream.java,v 1.4 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public abstract class LispStream extends LispObject
    2525{
    26     public LispObject typep(LispObject typeSpecifier) throws LispError
     26    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    2727    {
    2828        if (typeSpecifier == Symbol.STREAM)
  • trunk/j/src/org/armedbear/lisp/LispString.java

    r3832 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispString.java,v 1.57 2003-09-16 19:01:08 piso Exp $
     5 * $Id: LispString.java,v 1.58 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6464    }
    6565
    66     public LispObject typep(LispObject typeSpecifier) throws LispError
     66    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    6767    {
    6868        if (typeSpecifier instanceof Symbol) {
     
    114114    }
    115115
    116     public boolean equalp(LispObject obj) throws LispError
     116    public boolean equalp(LispObject obj) throws ConditionThrowable
    117117    {
    118118        if (this == obj)
     
    135135    }
    136136
    137     public LispObject subseq(int start, int end) throws LispError
     137    public LispObject subseq(int start, int end) throws ConditionThrowable
    138138    {
    139139        LispString s = new LispString(end - start);
     
    144144    }
    145145
    146     public void fill(LispObject obj) throws LispError
     146    public void fill(LispObject obj) throws ConditionThrowable
    147147    {
    148148        fill(LispCharacter.getValue(obj));
     
    155155    }
    156156
    157     public void shrink(int n) throws LispError
     157    public void shrink(int n) throws ConditionThrowable
    158158    {
    159159        if (n < array.length) {
     
    168168    }
    169169
    170     public LispObject reverse() throws LispError
     170    public LispObject reverse() throws ConditionThrowable
    171171    {
    172172        int length = length();
     
    178178    }
    179179
    180     public void nreverse() throws LispError
     180    public void nreverse() throws ConditionThrowable
    181181    {
    182182        int i = 0;
     
    191191    }
    192192
    193     public LispObject getRowMajor(int index) throws LispError
     193    public LispObject getRowMajor(int index) throws ConditionThrowable
    194194    {
    195195        try {
     
    202202    }
    203203
    204     public void setRowMajor(int index, LispObject newValue) throws LispError
     204    public void setRowMajor(int index, LispObject newValue) throws ConditionThrowable
    205205    {
    206206        try {
     
    212212    }
    213213
    214     public LispObject get(int index) throws LispError
     214    public LispObject get(int index) throws ConditionThrowable
    215215    {
    216216        try {
     
    223223    }
    224224
    225     public void set(int index, LispObject newValue) throws LispError
     225    public void set(int index, LispObject newValue) throws ConditionThrowable
    226226    {
    227227        try {
     
    238238    }
    239239
    240     public static String getValue(LispObject obj) throws LispError
     240    public static String getValue(LispObject obj) throws ConditionThrowable
    241241    {
    242242        try {
     
    272272    }
    273273
    274     public LispObject elt(int index) throws LispError
     274    public LispObject elt(int index) throws ConditionThrowable
    275275    {
    276276        int limit = fillPointer >= 0 ? fillPointer : array.length;
     
    281281
    282282    // Ignores fill pointer.
    283     public LispObject AREF(LispObject index) throws LispError
     283    public LispObject AREF(LispObject index) throws ConditionThrowable
    284284    {
    285285        try {
     
    292292    }
    293293
    294     public LispObject remove(LispObject item) throws LispError
     294    public LispObject remove(LispObject item) throws ConditionThrowable
    295295    {
    296296        throw new LispError("not implemented");
     
    334334        new Primitive3("%make-string", PACKAGE_SYS, false) {
    335335        public LispObject execute(LispObject size, LispObject initialElement,
    336                                   LispObject elementType) throws LispError
     336                                  LispObject elementType) throws ConditionThrowable
    337337        {
    338338            final int n = Fixnum.getValue(size);
     
    365365    private static final Primitive2 CHAR = new Primitive2("char") {
    366366        public LispObject execute(LispObject first, LispObject second)
    367             throws LispError
     367            throws ConditionThrowable
    368368        {
    369369            return checkString(first).get(Fixnum.getInt(second));
     
    374374        new Primitive3("%set-char", PACKAGE_SYS, false) {
    375375        public LispObject execute(LispObject first, LispObject second,
    376             LispObject third) throws LispError
     376            LispObject third) throws ConditionThrowable
    377377        {
    378378            checkString(first).set(Fixnum.getInt(second), checkCharacter(third));
     
    383383    private static final Primitive2 SCHAR = new Primitive2("schar") {
    384384        public LispObject execute(LispObject first, LispObject second)
    385             throws LispError
     385            throws ConditionThrowable
    386386        {
    387387            return checkString(first).get(Fixnum.getInt(second));
     
    392392        new Primitive3("%set-schar", PACKAGE_SYS, false) {
    393393        public LispObject execute(LispObject first, LispObject second,
    394             LispObject third) throws LispError
     394            LispObject third) throws ConditionThrowable
    395395        {
    396396            checkString(first).set(Fixnum.getInt(second), checkCharacter(third));
     
    403403        public LispObject execute(LispObject first, LispObject second,
    404404                                  LispObject third)
    405             throws LispError
     405            throws ConditionThrowable
    406406        {
    407407            char c = LispCharacter.getValue(first);
  • trunk/j/src/org/armedbear/lisp/LispThread.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: LispThread.java,v 1.10 2003-09-19 00:05:10 piso Exp $
     5 * $Id: LispThread.java,v 1.11 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    216216    }
    217217
    218     public void checkStack() throws LispError
     218    public void checkStack() throws ConditionThrowable
    219219    {
    220220        if (stack.size() > 0) {
     
    301301                stream.print(')');
    302302            }
    303             catch (LispError e) {
    304                 Debug.trace(e);
     303            catch (ConditionThrowable t) {
     304                Debug.trace(t);
    305305            }
    306306        } else {
     
    326326    private static final Primitive1 MAKE_THREAD =
    327327        new Primitive1("make-thread", PACKAGE_EXT, true) {
    328         public LispObject execute(LispObject arg) throws LispError
     328        public LispObject execute(LispObject arg) throws ConditionThrowable
    329329        {
    330330            Function fun = checkFunction(arg);
     
    335335    // ### sleep
    336336    private static final Primitive1 SLEEP = new Primitive1("sleep") {
    337         public LispObject execute(LispObject arg) throws LispError
     337        public LispObject execute(LispObject arg) throws ConditionThrowable
    338338        {
    339339            double d =
  • trunk/j/src/org/armedbear/lisp/Load.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Load.java,v 1.17 2003-09-19 00:05:10 piso Exp $
     5 * $Id: Load.java,v 1.18 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    279279        {
    280280            if (args.length == 0)
    281                 throw new WrongNumberOfArgumentsException(this);
     281                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    282282            // For now we require a string, but we should also support streams
    283283            // and pathnames.
  • trunk/j/src/org/armedbear/lisp/Module.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Module.java,v 1.4 2003-09-19 00:05:10 piso Exp $
     5 * $Id: Module.java,v 1.5 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4444
    4545    public LispObject dispatch(LispObject first, LispObject second, int index)
    46         throws LispError
     46        throws ConditionThrowable
    4747    {
    4848        throw new LispError();
  • trunk/j/src/org/armedbear/lisp/Nil.java

    r3788 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Nil.java,v 1.22 2003-09-15 04:16:07 piso Exp $
     5 * $Id: Nil.java,v 1.23 2003-09-19 01:46:41 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3535    }
    3636
    37     public LispObject typep(LispObject typeSpecifier) throws LispError
     37    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    3838    {
    3939        if (typeSpecifier == Symbol.NULL)
     
    8585    }
    8686
    87     public LispObject elt(int index) throws LispError
     87    public LispObject elt(int index) throws ConditionThrowable
    8888    {
    8989        throw new TypeError("ELT: invalid index " + index + " for " + this);
     
    120120    }
    121121
    122     public LispObject remove(LispObject item) throws LispError
     122    public LispObject remove(LispObject item) throws ConditionThrowable
    123123    {
    124124        return NIL;
  • trunk/j/src/org/armedbear/lisp/Package.java

    r3841 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Package.java,v 1.43 2003-09-17 14:56:53 piso Exp $
     5 * $Id: Package.java,v 1.44 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5858    }
    5959
    60     public LispObject typep(LispObject typeSpecifier) throws LispError
     60    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    6161    {
    6262        if (typeSpecifier == Symbol.PACKAGE)
     
    8989
    9090    public final synchronized void rename(String newName, LispObject newNicks)
    91         throws LispError
     91        throws ConditionThrowable
    9292    {
    9393        ArrayList arrayList = null;
     
    334334    }
    335335
    336     public synchronized void importSymbol(Symbol symbol) throws LispError
     336    public synchronized void importSymbol(Symbol symbol) throws ConditionThrowable
    337337    {
    338338        if (symbol.getPackage() == this)
     
    349349    }
    350350
    351     public synchronized void export(Symbol symbol) throws LispError
     351    public synchronized void export(Symbol symbol) throws ConditionThrowable
    352352    {
    353353        final String symbolName = symbol.getName();
     
    407407    }
    408408
    409     public synchronized void unexport(Symbol symbol) throws LispError
     409    public synchronized void unexport(Symbol symbol) throws ConditionThrowable
    410410    {
    411411        final String symbolName = symbol.getName();
     
    430430    }
    431431
    432     public synchronized void shadow(String symbolName) throws LispError
     432    public synchronized void shadow(String symbolName) throws ConditionThrowable
    433433    {
    434434        Symbol symbol = (Symbol) externalSymbols.get(symbolName);
     
    449449    }
    450450
    451     public synchronized void shadowingImport(Symbol symbol) throws LispError
     451    public synchronized void shadowingImport(Symbol symbol) throws ConditionThrowable
    452452    {
    453453        LispObject where = NIL;
     
    512512    }
    513513
    514     public final void addNickname(String s) throws LispError
     514    public final void addNickname(String s) throws ConditionThrowable
    515515    {
    516516        // This call will throw an error if there's a naming conflict.
  • trunk/j/src/org/armedbear/lisp/PackageFunctions.java

    r2880 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: PackageFunctions.java,v 1.16 2003-07-08 01:52:06 piso Exp $
     5 * $Id: PackageFunctions.java,v 1.17 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2727    // packagep object => generalized-boolean
    2828    private static final Primitive1 PACKAGEP = new Primitive1("packagep") {
    29         public LispObject execute(LispObject arg) throws LispError
     29        public LispObject execute(LispObject arg) throws ConditionThrowable
    3030        {
    3131            return arg instanceof Package ? T : NIL;
     
    3737    private static final Primitive1 PACKAGE_NAME =
    3838        new Primitive1("package-name") {
    39         public LispObject execute(LispObject arg) throws LispError
     39        public LispObject execute(LispObject arg) throws ConditionThrowable
    4040        {
    4141            String name = coerceToPackage(arg).getName();
     
    4848    private static final Primitive1 PACKAGE_NICKNAMES =
    4949        new Primitive1("package-nicknames") {
    50         public LispObject execute(LispObject arg) throws LispError
     50        public LispObject execute(LispObject arg) throws ConditionThrowable
    5151        {
    5252            return coerceToPackage(arg).packageNicknames();
     
    5858    private static final Primitive1 PACKAGE_USE_LIST =
    5959        new Primitive1("package-use-list") {
    60         public LispObject execute(LispObject arg) throws LispError
     60        public LispObject execute(LispObject arg) throws ConditionThrowable
    6161        {
    6262            return coerceToPackage(arg).getUseList();
     
    6868    private static final Primitive1 PACKAGE_USED_BY_LIST =
    6969        new Primitive1("package-used-by-list") {
    70         public LispObject execute(LispObject arg) throws LispError
     70        public LispObject execute(LispObject arg) throws ConditionThrowable
    7171        {
    7272            return coerceToPackage(arg).getUsedByList();
     
    7777    // import symbols &optional package => t
    7878    private static final Primitive IMPORT = new Primitive("import") {
    79         public LispObject execute(LispObject[] args) throws LispError
     79        public LispObject execute(LispObject[] args) throws ConditionThrowable
    8080        {
    8181            if (args.length == 0 || args.length > 2)
    82                 throw new WrongNumberOfArgumentsException(this);
     82                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    8383            LispObject symbols = args[0];
    8484            Package pkg =
     
    9898    // unexport symbols &optional package => t
    9999    private static final Primitive UNEXPORT = new Primitive("unexport") {
    100         public LispObject execute(LispObject[] args) throws LispError
     100        public LispObject execute(LispObject[] args) throws ConditionThrowable
    101101        {
    102102            if (args.length == 0 || args.length > 2)
    103                 throw new WrongNumberOfArgumentsException(this);
     103                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    104104            LispObject symbols = args[0];
    105105            Package pkg =
     
    119119    // shadow symbol-names &optional package => t
    120120    private static final Primitive SHADOW = new Primitive("shadow") {
    121         public LispObject execute(LispObject[] args) throws LispError
     121        public LispObject execute(LispObject[] args) throws ConditionThrowable
    122122        {
    123123            if (args.length == 0 || args.length > 2)
    124                 throw new WrongNumberOfArgumentsException(this);
     124                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    125125            LispObject symbols = args[0];
    126126            Package pkg =
     
    141141    private static final Primitive SHADOWING_IMPORT =
    142142        new Primitive("shadowing-import") {
    143         public LispObject execute(LispObject[] args) throws LispError
     143        public LispObject execute(LispObject[] args) throws ConditionThrowable
    144144        {
    145145            if (args.length == 0 || args.length > 2)
    146                 throw new WrongNumberOfArgumentsException(this);
     146                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    147147            LispObject symbols = args[0];
    148148            Package pkg =
     
    163163    private static final Primitive1 PACKAGE_SHADOWING_SYMBOLS =
    164164        new Primitive1("package-shadowing-symbols") {
    165         public LispObject execute(LispObject arg) throws LispError
     165        public LispObject execute(LispObject arg) throws ConditionThrowable
    166166        {
    167167            return coerceToPackage(arg).getShadowingSymbols();
     
    172172    private static final Primitive1 DELETE_PACKAGE =
    173173        new Primitive1("delete-package") {
    174         public LispObject execute(LispObject arg) throws LispError
     174        public LispObject execute(LispObject arg) throws ConditionThrowable
    175175        {
    176176            return coerceToPackage(arg).delete() ? T : NIL;
     
    182182    private static final Primitive USE_PACKAGE =
    183183        new Primitive("unuse-package") {
    184         public LispObject execute(LispObject[] args) throws LispError
     184        public LispObject execute(LispObject[] args) throws ConditionThrowable
    185185        {
    186186            if (args.length < 1 || args.length > 2)
    187                 throw new WrongNumberOfArgumentsException(this);
     187                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    188188            Package pkg;
    189189            if (args.length == 2)
     
    207207    private static final Primitive RENAME_PACKAGE =
    208208        new Primitive("rename-package") {
    209         public LispObject execute(LispObject[] args) throws LispError
     209        public LispObject execute(LispObject[] args) throws ConditionThrowable
    210210        {
    211211            if (args.length < 2 || args.length > 3)
    212                 throw new WrongNumberOfArgumentsException(this);
     212                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    213213            Package pkg = coerceToPackage(args[0]);
    214214            String newName = javaString(args[1]);
     
    232232    private static final Primitive _DEFPACKAGE =
    233233        new Primitive("%defpackage", PACKAGE_SYS, false) {
    234         public LispObject execute(LispObject[] args) throws LispError
     234        public LispObject execute(LispObject[] args) throws ConditionThrowable
    235235        {
    236236            if (args.length != 10)
    237                 throw new WrongNumberOfArgumentsException(this);
     237                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    238238            final String packageName = LispString.getValue(args[0]);
    239239            LispObject nicknames = checkList(args[1]);
  • trunk/j/src/org/armedbear/lisp/Packages.java

    r2875 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Packages.java,v 1.8 2003-07-07 19:37:39 piso Exp $
     5 * $Id: Packages.java,v 1.9 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5050
    5151    public static final synchronized void addPackage(Package pkg)
    52         throws LispError
     52        throws ConditionThrowable
    5353    {
    5454        final String name = pkg.getName();
     
    7474
    7575    public static final synchronized Package makePackage(String name)
    76         throws LispError
     76        throws ConditionThrowable
    7777    {
    7878        if (map.get(name) != null)
     
    8787    public static final synchronized void addNickname(Package pkg,
    8888                                                      String nickname)
    89         throws LispError
     89        throws ConditionThrowable
    9090    {
    9191        if (map.get(nickname) != null)
  • trunk/j/src/org/armedbear/lisp/Pathname.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Pathname.java,v 1.11 2003-09-19 00:05:11 piso Exp $
     5 * $Id: Pathname.java,v 1.12 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5353    }
    5454
    55     public LispObject typep(LispObject typeSpecifier) throws LispError
     55    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    5656    {
    5757        if (typeSpecifier == Symbol.PATHNAME)
     
    149149        {
    150150            if (args.length != 8)
    151                 throw new WrongNumberOfArgumentsException(this);
     151                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    152152            LispObject host = args[0];
    153153            LispObject device = args[1];
  • trunk/j/src/org/armedbear/lisp/Primitive0.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitive0.java,v 1.7 2003-09-19 00:05:11 piso Exp $
     5 * $Id: Primitive0.java,v 1.8 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5656    public LispObject execute(LispObject first) throws ConditionThrowable
    5757    {
    58         throw new WrongNumberOfArgumentsException(this);
     58        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5959    }
    6060
     
    6262        throws ConditionThrowable
    6363    {
    64         throw new WrongNumberOfArgumentsException(this);
     64        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    6565    }
    6666
     
    6868        LispObject third) throws ConditionThrowable
    6969    {
    70         throw new WrongNumberOfArgumentsException(this);
     70        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7171    }
    7272
     
    7474    {
    7575        if (args.length != 0)
    76             throw new WrongNumberOfArgumentsException(this);
     76            throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7777        return execute();
    7878    }
  • trunk/j/src/org/armedbear/lisp/Primitive1.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitive1.java,v 1.7 2003-09-19 00:05:11 piso Exp $
     5 * $Id: Primitive1.java,v 1.8 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5656    public LispObject execute() throws ConditionThrowable
    5757    {
    58         throw new WrongNumberOfArgumentsException(this);
     58        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5959    }
    6060
     
    6262        throws ConditionThrowable
    6363    {
    64         throw new WrongNumberOfArgumentsException(this);
     64        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    6565    }
    6666
     
    6868        LispObject third) throws ConditionThrowable
    6969    {
    70         throw new WrongNumberOfArgumentsException(this);
     70        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7171    }
    7272
     
    7474    {
    7575        if (args.length != 1)
    76             throw new WrongNumberOfArgumentsException(this);
     76            throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7777        return execute(args[0]);
    7878    }
  • trunk/j/src/org/armedbear/lisp/Primitive2.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitive2.java,v 1.6 2003-09-19 00:05:11 piso Exp $
     5 * $Id: Primitive2.java,v 1.7 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5050    public LispObject execute() throws ConditionThrowable
    5151    {
    52         throw new WrongNumberOfArgumentsException(this);
     52        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5353    }
    5454
     
    5656        throws ConditionThrowable
    5757    {
    58         throw new WrongNumberOfArgumentsException(this);
     58        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5959    }
    6060
     
    6262        LispObject third) throws ConditionThrowable
    6363    {
    64         throw new WrongNumberOfArgumentsException(this);
     64        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    6565    }
    6666
     
    6868    {
    6969        if (args.length != 2)
    70             throw new WrongNumberOfArgumentsException(this);
     70            throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7171        return execute(args[0], args[1]);
    7272    }
  • trunk/j/src/org/armedbear/lisp/Primitive3.java

    r3871 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitive3.java,v 1.7 2003-09-19 00:05:11 piso Exp $
     5 * $Id: Primitive3.java,v 1.8 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5050    public LispObject execute() throws ConditionThrowable
    5151    {
    52         throw new WrongNumberOfArgumentsException(this);
     52        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5353    }
    5454
     
    5656        throws ConditionThrowable
    5757    {
    58         throw new WrongNumberOfArgumentsException(this);
     58        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    5959    }
    6060
     
    6262        throws ConditionThrowable
    6363    {
    64         throw new WrongNumberOfArgumentsException(this);
     64        throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    6565    }
    6666
     
    6868    {
    6969        if (args.length != 3)
    70             throw new WrongNumberOfArgumentsException(this);
     70            throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    7171        return execute(args[0], args[1], args[2]);
    7272    }
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r3881 r3883  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.404 2003-09-19 01:08:41 piso Exp $
     5 * $Id: Primitives.java,v 1.405 2003-09-19 01:46:42 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    189189    // Primitive
    190190    public LispObject dispatch(LispObject[] args, int index)
    191         throws LispError
     191        throws ConditionThrowable
    192192    {
    193193        switch (index) {
     
    200200            case DIVIDE: {                      // ### /
    201201                if (args.length < 1)
    202                     throw new WrongNumberOfArgumentsException("/");
     202                    throw new ConditionThrowable(new WrongNumberOfArgumentsException("/"));
    203203                if (args.length == 1)
    204204                    return Fixnum.ONE.divideBy(args[0]);
     
    210210            case MIN: {                         // ### min
    211211                if (args.length < 1)
    212                     throw new WrongNumberOfArgumentsException("MIN");
     212                    throw new ConditionThrowable(new WrongNumberOfArgumentsException("MIN"));
    213213                LispObject result = args[0];
    214214                if (!result.realp())
     
    222222            case MAX: {                         // ### max
    223223                if (args.length < 1)
    224                     throw new WrongNumberOfArgumentsException("MAX");
     224                    throw new ConditionThrowable(new WrongNumberOfArgumentsException("MAX"));
    225225                LispObject result = args[0];
    226226                if (!result.realp())
     
    239239            default:
    240240                Debug.trace("bad index " + index);
    241                 throw new WrongNumberOfArgumentsException((String)null);
     241                throw new ConditionThrowable(new WrongNumberOfArgumentsException((String)null));
    242242        }
    243243    }
     
    375375            default:
    376376                Debug.trace("bad index " + index);
    377                 throw new WrongNumberOfArgumentsException((String)null);
     377                throw new ConditionThrowable(new WrongNumberOfArgumentsException((String)null));
    378378        }
    379379    }
     
    381381    // Primitive2
    382382    public LispObject dispatch(LispObject first, LispObject second, int index)
    383         throws LispError
     383        throws ConditionThrowable
    384384    {
    385385        switch (index) {
     
    406406            default:
    407407                Debug.trace("bad index " + index);
    408                 throw new WrongNumberOfArgumentsException((String)null);
     408                throw new ConditionThrowable(new WrongNumberOfArgumentsException((String)null));
    409409        }
    410410    }
     
    413413    private static final Primitive2 EQ = new Primitive2("eq") {
    414414        public LispObject execute(LispObject first, LispObject second)
    415             throws LispError
     415            throws ConditionThrowable
    416416        {
    417417            return first == second ? T : NIL;
     
    422422    private static final Primitive2 EQL = new Primitive2("eql") {
    423423        public LispObject execute(LispObject first, LispObject second)
    424             throws LispError
     424            throws ConditionThrowable
    425425        {
    426426            return first.eql(second) ? T : NIL;
     
    431431    private static final Primitive2 EQUAL = new Primitive2("equal") {
    432432        public LispObject execute(LispObject first, LispObject second)
    433             throws LispError
     433            throws ConditionThrowable
    434434        {
    435435            return first.equal(second) ? T : NIL;
     
    440440    private static final Primitive2 EQUALP = new Primitive2("equalp") {
    441441        public LispObject execute(LispObject first, LispObject second)
    442             throws LispError
     442            throws ConditionThrowable
    443443        {
    444444            return first.equalp(second) ? T : NIL;
     
    449449    private static final Primitive2 CONS = new Primitive2("cons") {
    450450        public LispObject execute(LispObject first, LispObject second)
    451             throws LispError
     451            throws ConditionThrowable
    452452        {
    453453            return new Cons(first, second);
     
    458458    private static final Primitive2 ELT = new Primitive2("elt") {
    459459        public LispObject execute(LispObject first, LispObject second)
    460             throws LispError
     460            throws ConditionThrowable
    461461        {
    462462            return first.elt(Fixnum.getValue(second));
     
    467467    private static final SpecialOperator QUOTE = new SpecialOperator("quote") {
    468468        public LispObject execute(LispObject args, Environment env)
    469             throws LispError
     469            throws ConditionThrowable
    470470        {
    471471            return args.car();
     
    475475    // ### atom
    476476    private static final Primitive1 ATOM = new Primitive1("atom") {
    477         public LispObject execute(LispObject arg) throws LispError
     477        public LispObject execute(LispObject arg) throws ConditionThrowable
    478478        {
    479479            return arg instanceof Cons ? NIL : T;
     
    483483    // ### constantp
    484484    private static final Primitive CONSTANTP = new Primitive("constantp") {
    485         public LispObject execute(LispObject arg) throws LispError
     485        public LispObject execute(LispObject arg) throws ConditionThrowable
    486486        {
    487487            return arg.CONSTANTP();
    488488        }
    489         public LispObject execute(LispObject first, LispObject second) throws LispError
     489        public LispObject execute(LispObject first, LispObject second) throws ConditionThrowable
    490490        {
    491491            return first.CONSTANTP();
     
    495495    // ### symbolp
    496496    private static final Primitive1 SYMBOLP = new Primitive1("symbolp") {
    497         public LispObject execute(LispObject arg) throws LispError
     497        public LispObject execute(LispObject arg) throws ConditionThrowable
    498498        {
    499499            return arg.SYMBOLP();
     
    503503    // ### endp
    504504    private static final Primitive1 ENDP = new Primitive1("endp") {
    505         public LispObject execute(LispObject arg) throws LispError
     505        public LispObject execute(LispObject arg) throws ConditionThrowable
    506506        {
    507507            return arg.ENDP();
     
    511511    // ### null
    512512    private static final Primitive1 NULL = new Primitive1("null") {
    513         public LispObject execute(LispObject arg) throws LispError
     513        public LispObject execute(LispObject arg) throws ConditionThrowable
    514514        {
    515515            return arg == NIL ? T : NIL;
     
    519519    // ### not
    520520    private static final Primitive1 NOT = new Primitive1("not") {
    521         public LispObject execute(LispObject arg) throws LispError
     521        public LispObject execute(LispObject arg) throws ConditionThrowable
    522522        {
    523523            return arg == NIL ? T : NIL;
     
    552552    private static final Primitive1 FIXNUMP =
    553553        new Primitive1("fixnump", PACKAGE_SYS, false) {
    554         public LispObject execute(LispObject arg) throws LispError
     554        public LispObject execute(LispObject arg) throws ConditionThrowable
    555555        {
    556556            return arg instanceof Fixnum ? T : NIL;
     
    561561    private static final Primitive ADD = new Primitive("+") {
    562562        public LispObject execute(LispObject first, LispObject second)
    563             throws LispError
     563            throws ConditionThrowable
    564564        {
    565565            return first.add(second);
    566566        }
    567         public LispObject execute(LispObject[] args) throws LispError
     567        public LispObject execute(LispObject[] args) throws ConditionThrowable
    568568        {
    569569            LispObject result = Fixnum.ZERO;
     
    578578    private static final Primitive SUBTRACT = new Primitive("-") {
    579579        public LispObject execute(LispObject first, LispObject second)
    580             throws LispError
     580            throws ConditionThrowable
    581581        {
    582582            return first.subtract(second);
    583583        }
    584         public LispObject execute(LispObject[] args) throws LispError
     584        public LispObject execute(LispObject[] args) throws ConditionThrowable
    585585        {
    586586            switch (args.length) {
    587587                case 0:
    588                     throw new WrongNumberOfArgumentsException("-");
     588                    throw new ConditionThrowable(new WrongNumberOfArgumentsException("-"));
    589589                case 1:
    590590                    return Fixnum.ZERO.subtract(args[0]);
     
    620620                }
    621621                default:
    622                     throw new WrongNumberOfArgumentsException("IF");
     622                    throw new ConditionThrowable(new WrongNumberOfArgumentsException("IF"));
    623623            }
    624624        }
     
    631631        {
    632632            if (args == NIL)
    633                 throw new WrongNumberOfArgumentsException(this);
     633                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    634634            final LispThread thread = LispThread.currentThread();
    635635            LispObject result = NIL;
     
    652652        {
    653653            if (args == NIL)
    654                 throw new WrongNumberOfArgumentsException(this);
     654                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    655655            final LispThread thread = LispThread.currentThread();
    656656            LispObject result = NIL;
     
    668668    // ### princ
    669669    private static final Primitive PRINC = new Primitive("princ") {
    670         public LispObject execute(LispObject[] args) throws LispError
     670        public LispObject execute(LispObject[] args) throws ConditionThrowable
    671671        {
    672672            if (args.length < 1 || args.length > 2)
    673                 throw new WrongNumberOfArgumentsException(this);
     673                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    674674            CharacterOutputStream out = null;
    675675            if (args.length == 2) {
     
    690690    private static final Primitive1 PRINC_TO_STRING =
    691691        new Primitive1("princ-to-string") {
    692         public LispObject execute(LispObject arg) throws LispError
     692        public LispObject execute(LispObject arg) throws ConditionThrowable
    693693        {
    694694            LispThread thread = LispThread.currentThread();
     
    704704    // prin1 object &optional output-stream => object
    705705    private static final Primitive PRIN1 = new Primitive("prin1") {
    706         public LispObject execute(LispObject arg) throws LispError
     706        public LispObject execute(LispObject arg) throws ConditionThrowable
    707707        {
    708708            CharacterOutputStream out = getStandardOutput();
     
    712712        }
    713713        public LispObject execute(LispObject first, LispObject second)
    714             throws LispError
     714            throws ConditionThrowable
    715715        {
    716716            CharacterOutputStream out;
     
    731731    private static final Primitive1 PRIN1_TO_STRING =
    732732        new Primitive1("prin1-to-string") {
    733         public LispObject execute(LispObject arg) throws LispError
     733        public LispObject execute(LispObject arg) throws ConditionThrowable
    734734        {
    735735            return new LispString(String.valueOf(arg));
     
    741741    // object is preceded by a newline and followed by a space.
    742742    private static final Primitive1 PRINT = new Primitive1("print") {
    743         public LispObject execute(LispObject arg) throws LispError
     743        public LispObject execute(LispObject arg) throws ConditionThrowable
    744744        {
    745745            CharacterOutputStream out = getStandardOutput();
     
    755755    // ### terpri
    756756    private static final Primitive TERPRI = new Primitive("terpri") {
    757         public LispObject execute(LispObject[] args) throws LispError
     757        public LispObject execute(LispObject[] args) throws ConditionThrowable
    758758        {
    759759            if (args.length > 1)
    760                 throw new WrongNumberOfArgumentsException(this);
     760                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    761761            CharacterOutputStream out = null;
    762762            if (args.length == 1) {
     
    774774    // ### fresh-line
    775775    private static final Primitive FRESH_LINE = new Primitive("fresh-line") {
    776         public LispObject execute(LispObject[] args) throws LispError
     776        public LispObject execute(LispObject[] args) throws ConditionThrowable
    777777        {
    778778            if (args.length > 1)
    779                 throw new WrongNumberOfArgumentsException(this);
     779                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    780780            CharacterOutputStream out;
    781781            if (args.length == 1)
     
    789789    // ### boundp
    790790    private static final Primitive1 BOUNDP = new Primitive1("boundp") {
    791         public LispObject execute(LispObject obj) throws LispError
     791        public LispObject execute(LispObject obj) throws ConditionThrowable
    792792        {
    793793            if (obj == NIL)
     
    811811        }
    812812        public LispObject execute(LispObject first, LispObject second)
    813             throws LispError
     813            throws ConditionThrowable
    814814        {
    815815            if (first == NIL)
     
    828828            return result;
    829829        }
    830         public LispObject execute(LispObject[] args) throws LispError
     830        public LispObject execute(LispObject[] args) throws ConditionThrowable
    831831        {
    832832            Cons result = null;
     
    867867    // ### nconc
    868868    private static final Primitive NCONC = new Primitive("nconc") {
    869         public LispObject execute(LispObject[] array) throws LispError
     869        public LispObject execute(LispObject[] array) throws ConditionThrowable
    870870        {
    871871            switch (array.length) {
     
    913913    private static final Primitive EQUALS = new Primitive("=") {
    914914        public LispObject execute(LispObject first, LispObject second)
    915             throws LispError
     915            throws ConditionThrowable
    916916        {
    917917            return first.isEqualTo(second) ? T : NIL;
    918918        }
    919         public LispObject execute(LispObject[] array) throws LispError
     919        public LispObject execute(LispObject[] array) throws ConditionThrowable
    920920        {
    921921            final int length = array.length;
    922922            if (length < 1)
    923                 throw new WrongNumberOfArgumentsException(this);
     923                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    924924            final LispObject obj = array[0];
    925925            for (int i = 1; i < length; i++) {
     
    934934    private static final Primitive NOT_EQUALS = new Primitive("/=") {
    935935        public LispObject execute(LispObject first, LispObject second)
    936             throws LispError
     936            throws ConditionThrowable
    937937        {
    938938            return first.isNotEqualTo(second) ? T : NIL;
    939939        }
    940         public LispObject execute(LispObject[] array) throws LispError
     940        public LispObject execute(LispObject[] array) throws ConditionThrowable
    941941        {
    942942            final int length = array.length;
     
    944944                return array[0].isNotEqualTo(array[1]) ? T : NIL;
    945945            if (length < 1)
    946                 throw new WrongNumberOfArgumentsException(this);
     946                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    947947            for (int i = 0; i < length; i++) {
    948948                final LispObject obj = array[i];
     
    960960    private static final Primitive LESS_THAN = new Primitive("<") {
    961961        public LispObject execute(LispObject first, LispObject second)
    962             throws LispError
     962            throws ConditionThrowable
    963963        {
    964964            return first.isLessThan(second) ? T : NIL;
    965965        }
    966         public LispObject execute(LispObject[] array) throws LispError
     966        public LispObject execute(LispObject[] array) throws ConditionThrowable
    967967        {
    968968            final int length = array.length;
    969969            if (length < 1)
    970                 throw new WrongNumberOfArgumentsException(this);
     970                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    971971            for (int i = 1; i < length; i++) {
    972972                if (array[i].isLessThanOrEqualTo(array[i-1]))
     
    980980    private static final Primitive LE = new Primitive("<=") {
    981981        public LispObject execute(LispObject first, LispObject second)
    982             throws LispError
     982            throws ConditionThrowable
    983983        {
    984984            return first.isLessThanOrEqualTo(second) ? T : NIL;
    985985        }
    986         public LispObject execute(LispObject[] array) throws LispError
     986        public LispObject execute(LispObject[] array) throws ConditionThrowable
    987987        {
    988988            switch (array.length) {
    989989                case 0:
    990                     throw new WrongNumberOfArgumentsException(this);
     990                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    991991                case 1:
    992992                    return T;
     
    10091009    private static final Primitive GREATER_THAN = new Primitive(">") {
    10101010        public LispObject execute(LispObject first, LispObject second)
    1011             throws LispError
     1011            throws ConditionThrowable
    10121012        {
    10131013            return first.isGreaterThan(second) ? T : NIL;
    10141014        }
    1015         public LispObject execute(LispObject[] array) throws LispError
     1015        public LispObject execute(LispObject[] array) throws ConditionThrowable
    10161016        {
    10171017            final int length = array.length;
    10181018            if (length < 1)
    1019                 throw new WrongNumberOfArgumentsException(this);
     1019                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    10201020            for (int i = 1; i < length; i++) {
    10211021                if (array[i].isGreaterThanOrEqualTo(array[i-1]))
     
    10291029    private static final Primitive GE = new Primitive(">=") {
    10301030        public LispObject execute(LispObject first, LispObject second)
    1031             throws LispError
     1031            throws ConditionThrowable
    10321032        {
    10331033            return first.isGreaterThanOrEqualTo(second) ? T : NIL;
    10341034        }
    1035         public LispObject execute(LispObject[] array) throws LispError
     1035        public LispObject execute(LispObject[] array) throws ConditionThrowable
    10361036        {
    10371037            final int length = array.length;
    10381038            switch (length) {
    10391039                case 0:
    1040                     throw new WrongNumberOfArgumentsException(this);
     1040                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    10411041                case 1:
    10421042                    return T;
     
    10591059    // Redefined properly in list.lisp.
    10601060    private static final Primitive ASSOC = new Primitive("assoc") {
    1061         public LispObject execute(LispObject[] args) throws LispError
     1061        public LispObject execute(LispObject[] args) throws ConditionThrowable
    10621062        {
    10631063            if (args.length != 2)
    1064                 throw new WrongNumberOfArgumentsException(this);
     1064                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    10651065            LispObject item = args[0];
    10661066            LispObject alist = args[1];
     
    10821082    private static final Primitive2 NTH = new Primitive2("nth") {
    10831083        public LispObject execute(LispObject first, LispObject second)
    1084             throws LispError
     1084            throws ConditionThrowable
    10851085        {
    10861086            int index = Fixnum.getValue(first);
     
    11041104        new Primitive3("%setnth", PACKAGE_SYS, false) {
    11051105        public LispObject execute(LispObject first, LispObject second,
    1106             LispObject third) throws LispError
     1106            LispObject third) throws ConditionThrowable
    11071107        {
    11081108            int index = Fixnum.getValue(first);
     
    11271127    private static final Primitive2 NTHCDR = new Primitive2("nthcdr") {
    11281128        public LispObject execute(LispObject first, LispObject second)
    1129             throws LispError
     1129            throws ConditionThrowable
    11301130        {
    11311131            final int index = Fixnum.getValue(first);
     
    11461146        {
    11471147            if (args.length < 1)
    1148                 throw new WrongNumberOfArgumentsException(this);
     1148                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    11491149            LispObject datum = args[0];
    11501150            if (datum instanceof Symbol) {
     
    11541154                    throw new ConditionThrowable(new ParseError(_format(args, 1)));
    11551155                if (datum == Symbol.PROGRAM_ERROR)
    1156                     throw new ProgramError(_format(args, 1));
     1156                    throw new ConditionThrowable(new ProgramError(_format(args, 1)));
    11571157                if (datum == Symbol.TYPE_ERROR)
    11581158                    throw new TypeError(_format(args, 1));
     
    11691169        {
    11701170            if (args.length < 1)
    1171                 throw new WrongNumberOfArgumentsException(this);
     1171                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    11721172            throw new SimpleCondition();
    11731173        }
     
    11761176    // ### format
    11771177    private static final Primitive FORMAT = new Primitive("format") {
    1178         public LispObject execute(LispObject[] args) throws LispError
     1178        public LispObject execute(LispObject[] args) throws ConditionThrowable
    11791179        {
    11801180            if (args.length < 2)
    1181                 throw new WrongNumberOfArgumentsException(this);
     1181                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    11821182            LispObject destination = args[0];
    11831183            // Copy remaining arguments.
     
    12071207
    12081208    private static final String _format(LispObject[] args, int skip)
    1209         throws LispError
     1209        throws ConditionThrowable
    12101210    {
    12111211        final int remaining = args.length - skip;
     
    12191219    }
    12201220
    1221     private static final String _format(LispObject[] args) throws LispError
     1221    private static final String _format(LispObject[] args) throws ConditionThrowable
    12221222    {
    12231223        final LispThread thread = LispThread.currentThread();
     
    12921292        new Primitive3("%defun", PACKAGE_SYS, false) {
    12931293        public LispObject execute(LispObject first, LispObject second,
    1294             LispObject third) throws LispError
     1294            LispObject third) throws ConditionThrowable
    12951295        {
    12961296            Symbol symbol = checkSymbol(first);
     
    13171317        new SpecialOperator("lambda") {
    13181318        public LispObject execute(LispObject args, Environment env)
    1319             throws LispError
     1319            throws ConditionThrowable
    13201320        {
    13211321            return new Closure(args.car(), args.cdr(), env);
     
    13271327    private static final Primitive MACRO_FUNCTION =
    13281328        new Primitive("macro-function") {
    1329         public LispObject execute(LispObject[] args) throws LispError
     1329        public LispObject execute(LispObject[] args) throws ConditionThrowable
    13301330        {
    13311331            if (args.length != 1)
    1332                 throw new WrongNumberOfArgumentsException(this);
     1332                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    13331333            Symbol symbol = checkSymbol(args[0]);
    13341334            LispObject obj = symbol.getSymbolFunction();
     
    13531353        new SpecialOperator("defmacro") {
    13541354        public LispObject execute(LispObject args, Environment env)
    1355             throws LispError
     1355            throws ConditionThrowable
    13561356        {
    13571357            Symbol symbol = checkSymbol(args.car());
     
    13811381    private static final Primitive1 MAKE_MACRO =
    13821382        new Primitive1("make-macro", PACKAGE_SYS, false) {
    1383         public LispObject execute(LispObject arg) throws LispError
     1383        public LispObject execute(LispObject arg) throws ConditionThrowable
    13841384        {
    13851385            return new MacroObject(arg);
     
    13921392        public LispObject execute(LispObject first, LispObject second,
    13931393                                  LispObject third)
    1394             throws LispError
     1394            throws ConditionThrowable
    13951395        {
    13961396            Symbol symbol = checkSymbol(first);
     
    14081408    private static final Primitive1 _DEFVAR =
    14091409        new Primitive1("%defvar", PACKAGE_SYS, false) {
    1410         public LispObject execute(LispObject arg) throws LispError
     1410        public LispObject execute(LispObject arg) throws ConditionThrowable
    14111411        {
    14121412            Symbol symbol = checkSymbol(arg);
     
    14211421        public LispObject execute(LispObject first, LispObject second,
    14221422                                  LispObject third)
    1423             throws LispError
     1423            throws ConditionThrowable
    14241424        {
    14251425            Symbol symbol = checkSymbol(first);
     
    18011801            return c.getCondition() instanceof ParseError;
    18021802        if (type == Symbol.PROGRAM_ERROR)
    1803             return c instanceof ProgramError;
     1803            return c.getCondition() instanceof ProgramError;
    18041804        if (type == Symbol.CONTROL_ERROR)
    18051805            return c instanceof ControlError;
    18061806        if (type == Symbol.SIMPLE_ERROR)
    18071807            return c instanceof SimpleError;
    1808         if (type == Symbol.ERROR)
    1809             return c instanceof LispError;
     1808        if (type == Symbol.ERROR) {
     1809            if (c instanceof LispError)
     1810                return true;
     1811            Condition condition = c.getCondition();
     1812            if (condition instanceof ParseError)
     1813                return true;
     1814            if (condition instanceof ProgramError)
     1815                return true;
     1816            return false;
     1817        }
    18101818        if (type == Symbol.SIMPLE_CONDITION)
    18111819            return c instanceof SimpleCondition;
     
    18231831    private static final Primitive UPGRADED_ARRAY_ELEMENT_TYPE =
    18241832        new Primitive("upgraded-array-element-type") {
    1825         public LispObject execute(LispObject arg) throws LispError
     1833        public LispObject execute(LispObject arg) throws ConditionThrowable
    18261834        {
    18271835            return getUpgradedArrayElementType(arg);
    18281836        }
    18291837        public LispObject execute(LispObject first, LispObject second)
    1830             throws LispError
     1838            throws ConditionThrowable
    18311839        {
    18321840            // Ignore environment.
     
    18391847    private static final Primitive1 ARRAY_RANK =
    18401848        new Primitive1("array-rank") {
    1841         public LispObject execute(LispObject arg) throws LispError
     1849        public LispObject execute(LispObject arg) throws ConditionThrowable
    18421850        {
    18431851            return new Fixnum(checkArray(arg).getRank());
     
    18501858    private static final Primitive1 ARRAY_DIMENSIONS =
    18511859        new Primitive1("array-dimensions") {
    1852         public LispObject execute(LispObject arg) throws LispError
     1860        public LispObject execute(LispObject arg) throws ConditionThrowable
    18531861        {
    18541862            return checkArray(arg).getDimensions();
     
    18611869        new Primitive2("array-dimension") {
    18621870        public LispObject execute(LispObject first, LispObject second)
    1863             throws LispError
     1871            throws ConditionThrowable
    18641872        {
    18651873            return new Fixnum(checkArray(first).getDimension(Fixnum.getValue(second)));
     
    18711879    private static final Primitive1 ARRAY_TOTAL_SIZE =
    18721880        new Primitive1("array-total-size") {
    1873         public LispObject execute(LispObject arg) throws LispError
     1881        public LispObject execute(LispObject arg) throws ConditionThrowable
    18741882        {
    18751883            return new Fixnum(checkArray(arg).getTotalSize());
     
    18821890    private static final Primitive1 ARRAY_ELEMENT_TYPE =
    18831891        new Primitive1("array-element-type") {
    1884         public LispObject execute(LispObject arg) throws LispError
     1892        public LispObject execute(LispObject arg) throws ConditionThrowable
    18851893        {
    18861894            return checkArray(arg).getElementType();
     
    18921900    private static final Primitive ARRAY_IN_BOUNDS_P =
    18931901        new Primitive("array-in-bounds-p") {
    1894         public LispObject execute(LispObject[] args) throws LispError
     1902        public LispObject execute(LispObject[] args) throws ConditionThrowable
    18951903        {
    18961904            if (args.length < 1)
    1897                 throw new WrongNumberOfArgumentsException(this);
     1905                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    18981906            AbstractArray array = checkArray(args[0]);
    18991907            int rank = array.getRank();
     
    19041912                sb.append(") for array of rank ");
    19051913                sb.append(rank);
    1906                 throw new ProgramError(sb.toString());
     1914                throw new ConditionThrowable(new ProgramError(sb.toString()));
    19071915            }
    19081916            for (int i = 0; i < rank; i++) {
     
    19261934        new Primitive2("%array-row-major-index", PACKAGE_SYS, false) {
    19271935        public LispObject execute(LispObject first, LispObject second)
    1928             throws LispError
     1936            throws ConditionThrowable
    19291937        {
    19301938            AbstractArray array = checkArray(first);
     
    19371945    // aref array &rest subscripts => element
    19381946    private static final Primitive AREF = new Primitive("aref") {
    1939         public LispObject execute(LispObject arg) throws LispError
     1947        public LispObject execute(LispObject arg) throws ConditionThrowable
    19401948        {
    19411949            AbstractArray array = checkArray(arg);
     
    19451953            sb.append("wrong number of subscripts (0) for array of rank ");
    19461954            sb.append(array.getRank());
    1947             throw new ProgramError(sb.toString());
     1955            throw new ConditionThrowable(new ProgramError(sb.toString()));
    19481956        }
    19491957        public LispObject execute(LispObject first, LispObject second)
    1950             throws LispError
     1958            throws ConditionThrowable
    19511959        {
    19521960            return first.AREF(second);
    19531961        }
    1954         public LispObject execute(LispObject[] args) throws LispError
     1962        public LispObject execute(LispObject[] args) throws ConditionThrowable
    19551963        {
    19561964            if (args.length < 1)
    1957                 throw new WrongNumberOfArgumentsException(this);
     1965                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    19581966            AbstractArray array = checkArray(args[0]);
    19591967            LispObject[] subscripts = new LispObject[args.length - 1];
     
    19661974
    19671975    private static final int arrayRowMajorIndex(AbstractArray array,
    1968                                                 LispObject[] subscripts) throws LispError
     1976                                                LispObject[] subscripts) throws ConditionThrowable
    19691977    {
    19701978        final int rank = array.getRank();
     
    19751983            sb.append(") for array of rank ");
    19761984            sb.append(rank);
    1977             throw new ProgramError(sb.toString());
     1985            throw new ConditionThrowable(new ProgramError(sb.toString()));
    19781986        }
    19791987        if (rank == 0)
     
    19891997                int n = ((Fixnum)subscript).getValue();
    19901998                if (n < 0 || n >= array.getDimension(i))
    1991                     throw new ProgramError();
     1999                    throw new ConditionThrowable(new ProgramError());
    19922000                sum += n * lastSize;
    19932001            } else if (subscript instanceof Bignum) {
    1994                 throw new ProgramError();
     2002                throw new ConditionThrowable(new ProgramError());
    19952003            } else
    19962004                throw new TypeError(subscript, "integer");
     
    20042012        new Primitive2("row-major-aref") {
    20052013        public LispObject execute(LispObject first, LispObject second)
    2006             throws LispError
     2014            throws ConditionThrowable
    20072015        {
    20082016            return checkArray(first).getRowMajor(Fixnum.getValue(second));
     
    20152023        new Primitive3("%set-row-major-aref", PACKAGE_SYS, false) {
    20162024        public LispObject execute(LispObject first, LispObject second,
    2017             LispObject third) throws LispError
     2025            LispObject third) throws ConditionThrowable
    20182026        {
    20192027            checkArray(first).setRowMajor(Fixnum.getValue(second), third);
     
    20242032    // ### vector
    20252033    private static final Primitive VECTOR = new Primitive("vector") {
    2026         public LispObject execute(LispObject[] args) throws LispError
     2034        public LispObject execute(LispObject[] args) throws ConditionThrowable
    20272035        {
    20282036            return new Vector(args);
     
    20342042    private static final Primitive2 SVREF = new Primitive2("svref") {
    20352043        public LispObject execute(LispObject first, LispObject second)
    2036             throws LispError
     2044            throws ConditionThrowable
    20372045        {
    20382046            AbstractVector v = checkVector(first);
     
    20502058        public LispObject execute(LispObject first, LispObject second,
    20512059                                  LispObject third)
    2052             throws LispError
     2060            throws ConditionThrowable
    20532061        {
    20542062            AbstractVector v = checkVector(first);
     
    20652073        new Primitive1("fill-pointer") {
    20662074        public LispObject execute(LispObject arg)
    2067             throws LispError
     2075            throws ConditionThrowable
    20682076        {
    20692077            int fillPointer = checkVector(arg).getFillPointer();
     
    20782086        new Primitive2("%set-fill-pointer", PACKAGE_SYS, false) {
    20792087        public LispObject execute(LispObject first, LispObject second)
    2080             throws LispError
     2088            throws ConditionThrowable
    20812089        {
    20822090            AbstractVector v = checkVector(first);
     
    20942102        new Primitive2("vector-push") {
    20952103        public LispObject execute(LispObject first, LispObject second)
    2096             throws LispError
     2104            throws ConditionThrowable
    20972105        {
    20982106            AbstractVector v = checkVector(second);
     
    21122120    private static final Primitive VECTOR_PUSH_EXTEND =
    21132121        new Primitive("vector-push-extend") {
    2114         public LispObject execute(LispObject[] args) throws LispError
     2122        public LispObject execute(LispObject[] args) throws ConditionThrowable
    21152123        {
    21162124            if (args.length < 2 || args.length > 3)
    2117                 throw new WrongNumberOfArgumentsException(this);
     2125                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    21182126            AbstractVector v = checkVector(args[1]);
    21192127            int extension = 0;
     
    21392147    // vector-pop vector => element
    21402148    private static final Primitive1 VECTOR_POP = new Primitive1("vector-pop") {
    2141         public LispObject execute(LispObject arg) throws LispError
     2149        public LispObject execute(LispObject arg) throws ConditionThrowable
    21422150        {
    21432151            AbstractVector v = checkVector(arg);
     
    21562164    // ### type-of
    21572165    private static final Primitive1 TYPE_OF = new Primitive1("type-of") {
    2158         public LispObject execute(LispObject arg) throws LispError
     2166        public LispObject execute(LispObject arg) throws ConditionThrowable
    21592167        {
    21602168            return arg.typeOf();
     
    21642172    // ### class-of
    21652173    private static final Primitive1 CLASS_OF = new Primitive1("class-of") {
    2166         public LispObject execute(LispObject arg) throws LispError
     2174        public LispObject execute(LispObject arg) throws ConditionThrowable
    21672175        {
    21682176            return arg.classOf();
     
    21752183    {
    21762184        public LispObject execute(LispObject first, LispObject second)
    2177             throws LispError
     2185            throws ConditionThrowable
    21782186        {
    21792187            return first.typep(second);
     
    21852193    private static final Primitive1 FUNCTION_LAMBDA_EXPRESSION =
    21862194        new Primitive1("function-lambda-expression") {
    2187         public LispObject execute(LispObject arg) throws LispError
     2195        public LispObject execute(LispObject arg) throws ConditionThrowable
    21882196        {
    21892197            LispObject[] values = new LispObject[3];
     
    22512259        {
    22522260            if (args.length < 1)
    2253                 throw new WrongNumberOfArgumentsException(this);
     2261                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    22542262            LispObject fun;
    22552263            if (args[0] instanceof Symbol)
     
    23092317            final int numArgs = args.length;
    23102318            if (numArgs < 2)
    2311                 throw new WrongNumberOfArgumentsException(this);
     2319                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    23122320            LispObject spread = checkList(args[numArgs - 1]);
    23132321            LispObject fun = args[0];
     
    23952403            final int numArgs = args.length;
    23962404            if (numArgs < 2)
    2397                 throw new WrongNumberOfArgumentsException(this);
     2405                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    23982406            // First argument must be a function.
    23992407            LispObject fun = args[0];
     
    24372445            final int length = args.length;
    24382446            if (length < 1 || length > 2)
    2439                 throw new WrongNumberOfArgumentsException(this);
     2447                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    24402448            LispObject form = args[0];
    24412449            Environment env =
     
    24522460            final int length = args.length;
    24532461            if (length < 1 || length > 2)
    2454                 throw new WrongNumberOfArgumentsException(this);
     2462                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    24552463            LispObject form = args[0];
    24562464            Environment env =
     
    24702478    // ### gensym
    24712479    private static final Primitive GENSYM = new Primitive("gensym") {
    2472         public LispObject execute(LispObject[] args) throws LispError
     2480        public LispObject execute(LispObject[] args) throws ConditionThrowable
    24732481        {
    24742482            if (args.length > 1)
    2475                 throw new WrongNumberOfArgumentsException(this);
     2483                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    24762484            String prefix = "G";
    24772485            if (args.length == 1) {
     
    25042512    };
    25052513
    2506     private static final Symbol gensym() throws LispError
     2514    private static final Symbol gensym() throws ConditionThrowable
    25072515    {
    25082516        return gensym("G");
    25092517    }
    25102518
    2511     private static final Symbol gensym(String prefix) throws LispError
     2519    private static final Symbol gensym(String prefix) throws ConditionThrowable
    25122520    {
    25132521        LispObject oldValue;
     
    25302538    // ### string
    25312539    private static final Primitive1 STRING = new Primitive1("string") {
    2532         public LispObject execute(LispObject arg) throws LispError
     2540        public LispObject execute(LispObject arg) throws ConditionThrowable
    25332541        {
    25342542            return string(arg);
     
    25402548    // status is one of :INHERITED, :EXTERNAL, :INTERNAL or NIL.
    25412549    private static final Primitive INTERN = new Primitive("intern") {
    2542         public LispObject execute(LispObject[] args) throws LispError
     2550        public LispObject execute(LispObject[] args) throws ConditionThrowable
    25432551        {
    25442552            final LispThread thread = LispThread.currentThread();
     
    25542562                }
    25552563                default:
    2556                     throw new WrongNumberOfArgumentsException(this);
     2564                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    25572565            }
    25582566        }
     
    25622570    // unintern symbol &optional package => generalized-boolean
    25632571    private static final Primitive UNINTERN = new Primitive("unintern") {
    2564         public LispObject execute(LispObject[] args) throws LispError
     2572        public LispObject execute(LispObject[] args) throws ConditionThrowable
    25652573        {
    25662574            if (args.length == 0 || args.length > 2)
    2567                 throw new WrongNumberOfArgumentsException(this);
     2575                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    25682576            Symbol symbol = checkSymbol(args[0]);
    25692577            Package pkg;
     
    25792587    private static final Primitive1 FIND_PACKAGE =
    25802588        new Primitive1("find-package") {
    2581         public LispObject execute(LispObject arg) throws LispError
     2589        public LispObject execute(LispObject arg) throws ConditionThrowable
    25822590        {
    25832591            if (arg instanceof Package)
     
    26082616        public LispObject execute(LispObject first, LispObject second,
    26092617                                  LispObject third)
    2610             throws LispError
     2618            throws ConditionThrowable
    26112619        {
    26122620            String packageName = javaString(first);
     
    26752683    private static final Primitive1 _IN_PACKAGE =
    26762684        new Primitive1("%in-package", PACKAGE_SYS, false) {
    2677         public LispObject execute(LispObject arg) throws LispError
     2685        public LispObject execute(LispObject arg) throws ConditionThrowable
    26782686        {
    26792687            String packageName = javaString(arg);
     
    26992707    // use-package packages-to-use &optional package => t
    27002708    private static final Primitive USE_PACKAGE = new Primitive("use-package") {
    2701         public LispObject execute(LispObject[] args) throws LispError
     2709        public LispObject execute(LispObject[] args) throws ConditionThrowable
    27022710        {
    27032711            if (args.length < 1 || args.length > 2)
    2704                 throw new WrongNumberOfArgumentsException(this);
     2712                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    27052713            Package pkg;
    27062714            if (args.length == 2)
     
    28372845    private static final Primitive EXPORT =
    28382846        new Primitive("export") {
    2839         public LispObject execute(LispObject[] args) throws LispError
     2847        public LispObject execute(LispObject[] args) throws ConditionThrowable
    28402848        {
    28412849            if (args.length == 0 || args.length > 2)
    2842                 throw new WrongNumberOfArgumentsException(this);
     2850                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    28432851            Package pkg;
    28442852            if (args.length == 2)
     
    28602868    private static final Primitive FIND_SYMBOL =
    28612869        new Primitive("find-symbol") {
    2862         public LispObject execute(LispObject[] args) throws LispError
     2870        public LispObject execute(LispObject[] args) throws ConditionThrowable
    28632871        {
    28642872            if (args.length == 0 || args.length > 2)
    2865                 throw new WrongNumberOfArgumentsException(this);
     2873                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    28662874            String name = LispString.getValue(args[0]);
    28672875            Package pkg;
     
    28782886        new Primitive2("fset", PACKAGE_SYS, false) {
    28792887        public LispObject execute(LispObject first, LispObject second)
    2880             throws LispError
     2888            throws ConditionThrowable
    28812889        {
    28822890            Symbol symbol = checkSymbol(first);
     
    29132921        new Primitive2("%set-symbol-plist", PACKAGE_SYS, false) {
    29142922        public LispObject execute(LispObject first, LispObject second)
    2915             throws LispError
     2923            throws ConditionThrowable
    29162924        {
    29172925            checkSymbol(first).setPropertyList(checkList(second));
     
    29232931    // get symbol indicator &optional default => value
    29242932    private static final Primitive GET = new Primitive("get") {
    2925         public LispObject execute(LispObject[] args) throws LispError
     2933        public LispObject execute(LispObject[] args) throws ConditionThrowable
    29262934        {
    29272935            Symbol symbol;
     
    29402948                    break;
    29412949                default:
    2942                     throw new WrongNumberOfArgumentsException(this);
     2950                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    29432951            }
    29442952            return get(symbol, indicator, defaultValue);
     
    29512959        new Primitive3("%put", PACKAGE_SYS, false) {
    29522960        public LispObject execute(LispObject first, LispObject second,
    2953             LispObject third) throws LispError
     2961            LispObject third) throws ConditionThrowable
    29542962        {
    29552963            Symbol symbol = checkSymbol(first);
     
    31553163    private static final SpecialOperator GO = new SpecialOperator("go") {
    31563164        public LispObject execute(LispObject args, Environment env)
    3157             throws LispError
     3165            throws ConditionThrowable
    31583166        {
    31593167            if (args.length() != 1)
    3160                 throw new WrongNumberOfArgumentsException(this);
     3168                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    31613169            throw new Go(args.car());
    31623170        }
     
    31693177        {
    31703178            if (args == NIL)
    3171                 throw new WrongNumberOfArgumentsException(this);
     3179                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    31723180            LispObject tag;
    31733181            if (args.car() == NIL)
     
    32143222            final int length = args.length();
    32153223            if (length < 1 || length > 2)
    3216                 throw new WrongNumberOfArgumentsException(this);
     3224                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    32173225            Symbol symbol = checkSymbol(args.car());
    32183226            Block block = env.lookupBlock(symbol);
     
    32473255                                          LispThread.currentThread()));
    32483256                default:
    3249                     throw new WrongNumberOfArgumentsException(this);
     3257                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    32503258            }
    32513259        }
     
    32583266        {
    32593267            if (args.length() < 1)
    3260                 throw new WrongNumberOfArgumentsException(this);
     3268                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    32613269            final LispThread thread = LispThread.currentThread();
    32623270            LispObject tag = eval(args.car(), env, thread);
     
    32903298        {
    32913299            if (args.length() < 2)
    3292                 throw new WrongNumberOfArgumentsException(this);
     3300                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    32933301            final LispThread thread = LispThread.currentThread();
    32943302            LispObject tag = eval(args.car(), env, thread);
     
    34403448        {
    34413449            if (args.length() != 2)
    3442                 throw new WrongNumberOfArgumentsException(this);
     3450                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    34433451            LispObject vars = args.car();
    34443452            LispObject form = args.cadr();
     
    34913499        {
    34923500            if (args.length() == 0)
    3493                 throw new WrongNumberOfArgumentsException(this);
     3501                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    34943502            final LispThread thread = LispThread.currentThread();
    34953503            LispObject result = eval(args.car(), env, thread);
     
    35093517        {
    35103518            if (args.length() == 0)
    3511                 throw new WrongNumberOfArgumentsException(this);
     3519                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    35123520            final LispThread thread = LispThread.currentThread();
    35133521            LispObject function;
     
    35943602        {
    35953603            if (args.length() != 1)
    3596                 throw new WrongNumberOfArgumentsException(this);
     3604                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    35973605            if (eval(args.car(), env, LispThread.currentThread()) == NIL)
    35983606                throw new LispError("assertion failed: " + args.car());
     
    36053613    private static final Primitive WRITE_CHAR =
    36063614        new Primitive("write-char") {
    3607         public LispObject execute(LispObject[] args) throws LispError
     3615        public LispObject execute(LispObject[] args) throws ConditionThrowable
    36083616        {
    36093617            if (args.length < 1 || args.length > 2)
    3610                 throw new WrongNumberOfArgumentsException(this);
     3618                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    36113619            char c = LispCharacter.getValue(args[0]);
    36123620            CharacterOutputStream out = null;
     
    36323640    private static final Primitive WRITE_STRING =
    36333641        new Primitive("write-string") {
    3634         public LispObject execute(LispObject[] args) throws LispError
     3642        public LispObject execute(LispObject[] args) throws ConditionThrowable
    36353643        {
    36363644            if (args.length == 0)
    3637                 throw new WrongNumberOfArgumentsException(this);
     3645                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    36383646            LispString string = checkString(args[0]);
    36393647            CharacterOutputStream out = null;
     
    36593667    private static final Primitive FINISH_OUTPUT =
    36603668        new Primitive("finish-output") {
    3661         public LispObject execute(LispObject[] args) throws LispError
     3669        public LispObject execute(LispObject[] args) throws ConditionThrowable
    36623670        {
    36633671            if (args.length > 1)
    3664                 throw new WrongNumberOfArgumentsException(this);
     3672                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    36653673            CharacterOutputStream out = null;
    36663674            if (args.length == 0)
     
    36853693    // close stream &key abort => result
    36863694    private static final Primitive CLOSE = new Primitive("close") {
    3687         public LispObject execute(LispObject[] args) throws LispError
     3695        public LispObject execute(LispObject[] args) throws ConditionThrowable
    36883696        {
    36893697            final int length = args.length;
    36903698            if (length == 0)
    3691                 throw new WrongNumberOfArgumentsException(this);
     3699                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    36923700            LispObject abort = NIL; // Default.
    36933701            LispStream stream = checkStream(args[0]);
    36943702            if (length > 1) {
    36953703                if ((length - 1) % 2 != 0)
    3696                     throw new ProgramError("odd number of keyword arguments");
     3704                    throw new ConditionThrowable(new ProgramError("odd number of keyword arguments"));
    36973705                if (length > 3)
    3698                     throw new WrongNumberOfArgumentsException(this);
     3706                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    36993707                if (args[1] == Keyword.ABORT)
    37003708                    abort = args[2];
     
    37173725        {
    37183726            if (args.length() != 1)
    3719                 throw new WrongNumberOfArgumentsException(this);
     3727                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    37203728            final LispThread thread = LispThread.currentThread();
    37213729            LispObject result = eval(args.car(), env, thread);
     
    37423750        {
    37433751            if (args.length() != 2)
    3744                 throw new WrongNumberOfArgumentsException(this);
     3752                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    37453753            final LispThread thread = LispThread.currentThread();
    37463754            int n = Fixnum.getInt(eval(args.car(), env, thread));
     
    37653773        new Primitive2("write-byte") {
    37663774        public LispObject execute (LispObject first, LispObject second)
    3767             throws LispError
     3775            throws ConditionThrowable
    37683776        {
    37693777            int n = Fixnum.getValue(first);
     
    37823790    private static final Primitive READ_BYTE =
    37833791        new Primitive("read-byte") {
    3784         public LispObject execute (LispObject[] args) throws LispError
     3792        public LispObject execute (LispObject[] args) throws ConditionThrowable
    37853793        {
    37863794            int length = args.length;
    37873795            if (length < 1 || length > 3)
    3788                 throw new WrongNumberOfArgumentsException(this);
     3796                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    37893797            BinaryInputStream stream;
    37903798            if (args[0] instanceof BinaryInputStream)
     
    38073815            int length = args.length;
    38083816            if (length > 4)
    3809                 throw new WrongNumberOfArgumentsException(this);
     3817                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    38103818            CharacterInputStream stream;
    38113819            if (length == 0)
     
    38323840        {
    38333841            if (args.length < 6)
    3834                 throw new WrongNumberOfArgumentsException(this);
     3842                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    38353843            String s = LispString.getValue(args[0]);
    38363844            boolean eofError = args[1] != NIL;
     
    38653873    private static final Primitive1 STANDARD_CHAR_P =
    38663874        new Primitive1("standard-char-p") {
    3867         public LispObject execute(LispObject arg) throws LispError
     3875        public LispObject execute(LispObject arg) throws ConditionThrowable
    38683876        {
    38693877            return checkCharacter(arg).isStandardChar();
     
    38733881    private static final Primitive1 GRAPHIC_CHAR_P =
    38743882        new Primitive1("graphic-char-p") {
    3875         public LispObject execute(LispObject arg) throws LispError
     3883        public LispObject execute(LispObject arg) throws ConditionThrowable
    38763884        {
    38773885            char c = LispCharacter.getValue(arg);
     
    38823890    private static final Primitive1 ALPHA_CHAR_P =
    38833891        new Primitive1("alpha-char-p") {
    3884         public LispObject execute(LispObject arg) throws LispError
     3892        public LispObject execute(LispObject arg) throws ConditionThrowable
    38853893        {
    38863894            char c = LispCharacter.getValue(arg);
     
    38903898
    38913899    private static final Primitive1 NAME_CHAR = new Primitive1("name-char") {
    3892         public LispObject execute(LispObject arg) throws LispError
     3900        public LispObject execute(LispObject arg) throws ConditionThrowable
    38933901        {
    38943902            String s = LispString.getValue(string(arg));
     
    38993907
    39003908    private static final Primitive1 CHAR_NAME = new Primitive1("char-name") {
    3901         public LispObject execute(LispObject arg) throws LispError
     3909        public LispObject execute(LispObject arg) throws ConditionThrowable
    39023910        {
    39033911            char c = LispCharacter.getValue(arg);
     
    39273935
    39283936    private static final Primitive DIGIT_CHAR = new Primitive("digit-char") {
    3929         public LispObject execute(LispObject[] args) throws LispError
     3937        public LispObject execute(LispObject[] args) throws ConditionThrowable
    39303938        {
    39313939            final long radix;
     
    39383946                    break;
    39393947                default:
    3940                     throw new WrongNumberOfArgumentsException(this);
     3948                    throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    39413949            }
    39423950            long weight = Fixnum.getValue(args[0]);
     
    39513959    private static final Primitive1 _CALL_COUNT =
    39523960        new Primitive1("%call-count", PACKAGE_SYS, false) {
    3953         public LispObject execute(LispObject arg) throws LispError
     3961        public LispObject execute(LispObject arg) throws ConditionThrowable
    39543962        {
    39553963            return new Fixnum(arg.getCallCount());
     
    39603968        new Primitive2("%set-call-count", PACKAGE_SYS, false) {
    39613969        public LispObject execute(LispObject first, LispObject second)
    3962             throws LispError
     3970            throws ConditionThrowable
    39633971        {
    39643972            first.setCallCount(Fixnum.getValue(second));
     
    39723980    private static final Primitive GET_DISPATCH_MACRO_CHARACTER =
    39733981        new Primitive("get-dispatch-macro-character") {
    3974         public LispObject execute(LispObject[] args) throws LispError
     3982        public LispObject execute(LispObject[] args) throws ConditionThrowable
    39753983        {
    39763984            if (args.length < 2 || args.length > 3)
    3977                 throw new WrongNumberOfArgumentsException(this);
     3985                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    39783986            char dispChar = LispCharacter.getValue(args[0]);
    39793987            char subChar = LispCharacter.getValue(args[1]);
     
    39924000    private static final Primitive SET_DISPATCH_MACRO_CHARACTER =
    39934001        new Primitive("set-dispatch-macro-character") {
    3994         public LispObject execute(LispObject[] args) throws LispError
     4002        public LispObject execute(LispObject[] args) throws ConditionThrowable
    39954003        {
    39964004            if (args.length < 3 || args.length > 4)
    3997                 throw new WrongNumberOfArgumentsException(this);
     4005                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    39984006            char dispChar = LispCharacter.getValue(args[0]);
    39994007            char subChar = LispCharacter.getValue(args[1]);
     
    40144022            int length = args.length;
    40154023            if (length > 4)
    4016                 throw new WrongNumberOfArgumentsException(this);
     4024                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    40174025            CharacterInputStream stream =
    40184026                length > 0 ? checkInputStream(args[0]) : getStandardInput();
     
    40274035        new Primitive2("%set-lambda-name", PACKAGE_SYS, false) {
    40284036        public LispObject execute(LispObject first, LispObject second)
    4029             throws LispError
     4037            throws ConditionThrowable
    40304038        {
    40314039            if (first instanceof Function) {
     
    40444052        new Primitive2("shrink-vector", PACKAGE_SYS, false) {
    40454053        public LispObject execute(LispObject first, LispObject second)
    4046             throws LispError
     4054            throws ConditionThrowable
    40474055        {
    40484056            checkVector(first).shrink(Fixnum.getInt(second));
     
    40544062        new Primitive3("vector-subseq", PACKAGE_SYS, false) {
    40554063        public LispObject execute(LispObject vector, LispObject start,
    4056             LispObject end) throws LispError
     4064            LispObject end) throws ConditionThrowable
    40574065        {
    40584066            AbstractVector v = checkVector(vector);
     
    40694077            int length = args.length;
    40704078            if (length < 1 || length > 2)
    4071                 throw new WrongNumberOfArgumentsException(this);
     4079                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    40724080            Random random;
    40734081            if (length == 2)
     
    41164124            final int length = args.length;
    41174125            if (length < 1 || length > 2)
    4118                 throw new WrongNumberOfArgumentsException(this);
     4126                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    41194127            LispObject n = args[0];
    41204128            LispObject d = length == 1 ? Fixnum.ONE : args[1];
     
    41354143    private static final Primitive2 ASH = new Primitive2("ash") {
    41364144        public LispObject execute(LispObject first, LispObject second)
    4137             throws LispError
     4145            throws ConditionThrowable
    41384146        {
    41394147            BigInteger n;
     
    41704178    public static final Primitive2 EXPT = new Primitive2("expt") {
    41714179        public LispObject execute(LispObject n, LispObject power)
    4172             throws LispError
     4180            throws ConditionThrowable
    41734181        {
    41744182            if (power.zerop()) {
     
    42164224    // ### list
    42174225    private static final Primitive LIST = new Primitive("list") {
    4218         public LispObject execute(LispObject arg) throws LispError
     4226        public LispObject execute(LispObject arg) throws ConditionThrowable
    42194227        {
    42204228            return new Cons(arg);
    42214229        }
    42224230        public LispObject execute(LispObject first, LispObject second)
    4223             throws LispError
     4231            throws ConditionThrowable
    42244232        {
    42254233            return new Cons(first, new Cons(second));
    42264234        }
    42274235        public LispObject execute(LispObject first, LispObject second,
    4228             LispObject third) throws LispError
     4236            LispObject third) throws ConditionThrowable
    42294237        {
    42304238            return new Cons(first, new Cons(second, new Cons(third)));
    42314239        }
    4232         public LispObject execute(LispObject[] args) throws LispError
     4240        public LispObject execute(LispObject[] args) throws ConditionThrowable
    42334241        {
    42344242            LispObject result = NIL;
     
    42414249    // ### list*
    42424250    private static final Primitive LIST_ = new Primitive("list*") {
    4243         public LispObject execute() throws LispError
    4244         {
    4245             throw new WrongNumberOfArgumentsException("LIST*");
    4246         }
    4247         public LispObject execute(LispObject arg) throws LispError
     4251        public LispObject execute() throws ConditionThrowable
     4252        {
     4253            throw new ConditionThrowable(new WrongNumberOfArgumentsException("LIST*"));
     4254        }
     4255        public LispObject execute(LispObject arg) throws ConditionThrowable
    42484256        {
    42494257            return arg;
    42504258        }
    42514259        public LispObject execute(LispObject first, LispObject second)
    4252             throws LispError
     4260            throws ConditionThrowable
    42534261        {
    42544262            return new Cons(first, second);
    42554263        }
    42564264        public LispObject execute(LispObject first, LispObject second,
    4257                                   LispObject third) throws LispError
     4265                                  LispObject third) throws ConditionThrowable
    42584266        {
    42594267            return new Cons(first, new Cons(second, third));
    42604268        }
    4261         public LispObject execute(LispObject[] args) throws LispError
     4269        public LispObject execute(LispObject[] args) throws ConditionThrowable
    42624270        {
    42634271            int i = args.length - 1;
     
    42714279    // ### nreverse
    42724280    private static final Primitive1 NREVERSE = new Primitive1("nreverse") {
    4273         public LispObject execute (LispObject arg) throws LispError {
     4281        public LispObject execute (LispObject arg) throws ConditionThrowable {
    42744282            if (arg instanceof AbstractVector) {
    42754283                ((AbstractVector)arg).nreverse();
     
    43064314    private static final Primitive2 NRECONC = new Primitive2("nreconc") {
    43074315        public LispObject execute(LispObject list, LispObject obj)
    4308             throws LispError
     4316            throws ConditionThrowable
    43094317        {
    43104318            if (list instanceof Cons) {
     
    43384346    // ### reverse
    43394347    private static final Primitive1 REVERSE = new Primitive1("reverse") {
    4340         public LispObject execute(LispObject arg) throws LispError
     4348        public LispObject execute(LispObject arg) throws ConditionThrowable
    43414349        {
    43424350            if (arg instanceof AbstractVector)
     
    43604368    private static final Primitive3 _SETELT = new Primitive3("%setelt") {
    43614369        public LispObject execute(LispObject first, LispObject second,
    4362             LispObject third) throws LispError
     4370            LispObject third) throws ConditionThrowable
    43634371        {
    43644372            if (first instanceof Cons) {
     
    44334441    private static final Primitive2 MEMQ = new Primitive2("memq") {
    44344442        public LispObject execute(LispObject item, LispObject list)
    4435             throws LispError
     4443            throws ConditionThrowable
    44364444        {
    44374445            LispObject tail = checkList(list);
     
    44514459        {
    44524460            if (args.length != 5)
    4453                 throw new WrongNumberOfArgumentsException(this);
     4461                throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
    44544462            LispObject item = args[0];
    44554463            LispObject tail = checkList(args[1]);
     
    45894597    // ### complex
    45904598    private static final Primitive2 COMPLEX = new Primitive2("complex") {
    4591         public LispObject execute(LispObject arg) throws LispError
     4599        public LispObject execute(LispObject arg) throws ConditionThrowable
    45924600        {
    45934601            if (arg instanceof LispFloat)
     
    45984606        }
    45994607        public LispObject execute(LispObject first, LispObject second)
    4600             throws LispError
     4608            throws ConditionThrowable
    46014609        {
    46024610            return Complex.getInsta