Changeset 5114


Ignore:
Timestamp:
12/13/03 00:58:51 (17 years ago)
Author:
piso
Message:

signal()

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

Legend:

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

    r4262 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AbstractArray.java,v 1.11 2003-10-09 15:20:52 piso Exp $
     5 * $Id: AbstractArray.java,v 1.12 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5757        sb.append("wrong number of subscripts (1) for array of rank ");
    5858        sb.append(getRank());
    59         throw new ConditionThrowable(new ProgramError(sb.toString()));
     59        return signal(new ProgramError(sb.toString()));
    6060    }
    6161
  • trunk/j/src/org/armedbear/lisp/Autoload.java

    r5067 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Autoload.java,v 1.110 2003-12-11 19:10:57 piso Exp $
     5 * $Id: Autoload.java,v 1.111 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    153153                return T;
    154154            }
    155             throw new ConditionThrowable(new TypeError(first));
     155            return signal(new TypeError(first));
    156156        }
    157157        public LispObject execute(LispObject first, LispObject second)
     
    171171                return T;
    172172            }
    173             throw new ConditionThrowable(new TypeError(first));
     173            return signal(new TypeError(first));
    174174        }
    175175    };
  • trunk/j/src/org/armedbear/lisp/AutoloadMacro.java

    r4748 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AutoloadMacro.java,v 1.7 2003-11-14 17:47:53 piso Exp $
     5 * $Id: AutoloadMacro.java,v 1.8 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6666                return T;
    6767            }
    68             throw new ConditionThrowable(new TypeError(first));
     68            return signal(new TypeError(first));
    6969        }
    7070        public LispObject execute(LispObject first, LispObject second)
     
    8484                return T;
    8585            }
    86             throw new ConditionThrowable(new TypeError(first));
     86            return signal(new TypeError(first));
    8787        }
    8888    };
  • trunk/j/src/org/armedbear/lisp/BinaryInputStream.java

    r4632 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: BinaryInputStream.java,v 1.6 2003-11-03 16:07:53 piso Exp $
     5 * $Id: BinaryInputStream.java,v 1.7 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4444        }
    4545        catch (IOException e) {
    46             throw new ConditionThrowable(new StreamError(e));
     46            return signal(new StreamError(e));
    4747        }
    4848        if (n < 0) {
    4949            if (eofError)
    50                 throw new ConditionThrowable(new EndOfFile());
     50                return signal(new EndOfFile());
    5151            else
    5252                return eofValue;
     
    6363        }
    6464        catch (IOException e) {
    65             throw new ConditionThrowable(new StreamError(e));
     65            return signal(new StreamError(e));
    6666        }
    6767    }
  • trunk/j/src/org/armedbear/lisp/BinaryOutputStream.java

    r4424 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: BinaryOutputStream.java,v 1.6 2003-10-17 13:11:52 piso Exp $
     5 * $Id: BinaryOutputStream.java,v 1.7 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4141        }
    4242        catch (IOException e) {
    43             throw new ConditionThrowable(new StreamError(e));
     43            signal(new StreamError(e));
    4444        }
    4545    }
     
    5151        }
    5252        catch (IOException e) {
    53             throw new ConditionThrowable(new StreamError(e));
     53            signal(new StreamError(e));
    5454        }
    5555    }
     
    6363        }
    6464        catch (IOException e) {
    65             throw new ConditionThrowable(new StreamError(e));
     65            return signal(new StreamError(e));
    6666        }
    6767    }
  • trunk/j/src/org/armedbear/lisp/BitVector.java

    r4923 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: BitVector.java,v 1.28 2003-11-30 06:14:39 piso Exp $
     5 * $Id: BitVector.java,v 1.29 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    181181        }
    182182        catch (ConditionThrowable t) {}
    183         throw new ConditionThrowable(new TypeError(newValue, "bit"));
     183        signal(new TypeError(newValue, "bit"));
    184184    }
    185185
     
    226226        }
    227227        catch (ConditionThrowable t) {}
    228         throw new ConditionThrowable(new TypeError(obj, "bit"));
     228        signal(new TypeError(obj, "bit"));
    229229    }
    230230
     
    245245        if (n == capacity)
    246246            return;
    247         throw new ConditionThrowable(new LispError());
     247        signal(new LispError());
    248248    }
    249249
  • trunk/j/src/org/armedbear/lisp/CompiledFunction.java

    r4944 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CompiledFunction.java,v 1.16 2003-12-02 19:51:21 piso Exp $
     5 * $Id: CompiledFunction.java,v 1.17 2003-12-13 00:58:50 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6969    public LispObject execute(LispObject[] args) throws ConditionThrowable
    7070    {
    71         throw new ConditionThrowable(new LispError("not implemented"));
     71        return signal(new LispError("not implemented"));
    7272    }
    7373
     
    120120                }
    121121                catch (VerifyError e) {
    122                     throw new ConditionThrowable(new LispError("class verification failed: " +
     122                    return signal(new LispError("class verification failed: " +
    123123                                                               e.getMessage()));
    124124                }
     
    127127                }
    128128            }
    129             throw new ConditionThrowable(
     129            return signal(
    130130                new LispError("unable to load ".concat(String.valueOf(arg))));
    131131        }
     
    139139            if (arg instanceof CompiledFunction)
    140140                return ((CompiledFunction)arg).getVariableList();
    141             throw new ConditionThrowable(new TypeError(arg, "compiled function"));
     141            return signal(new TypeError(arg, "compiled function"));
    142142        }
    143143    };
  • trunk/j/src/org/armedbear/lisp/Complex.java

    r3929 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Complex.java,v 1.24 2003-09-20 17:02:04 piso Exp $
     5 * $Id: Complex.java,v 1.25 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3838    {
    3939        if (!realpart.realp())
    40             throw new ConditionThrowable(new TypeError(realpart, "real number"));
     40            return signal(new TypeError(realpart, "real number"));
    4141        if (!imagpart.realp())
    42             throw new ConditionThrowable(new TypeError(imagpart, "real number"));
     42            return signal(new TypeError(imagpart, "real number"));
    4343        if (realpart instanceof LispFloat)
    4444            imagpart = LispFloat.coerceToFloat(imagpart);
     
    201201            return false;
    202202        }
    203         throw new ConditionThrowable(new TypeError(obj, "number"));
     203        signal(new TypeError(obj, "number"));
     204        // Not reached.
     205        return false;
    204206    }
    205207
  • trunk/j/src/org/armedbear/lisp/DisplacedArray.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: DisplacedArray.java,v 1.17 2003-12-09 20:26:22 asimon Exp $
     5 * $Id: DisplacedArray.java,v 1.18 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9191        if (dimv.length == 1)
    9292            return size;
    93         throw new ConditionThrowable(new TypeError(this, "sequence"));
     93        signal(new TypeError(this, "sequence"));
     94        // Not reached.
     95        return 0;
    9496    }
    9597
     
    98100        if (dimv.length == 1)
    99101            return getRowMajor(index);
    100         throw new ConditionThrowable(new TypeError(this, "sequence"));
     102        return signal(new TypeError(this, "sequence"));
    101103    }
    102104
     
    108110        sb.append("wrong number of subscripts (1) for array of rank ");
    109111        sb.append(getRank());
    110         throw new ConditionThrowable(new ProgramError(sb.toString()));
     112        return signal(new ProgramError(sb.toString()));
    111113    }
    112114
     
    130132        }
    131133        catch (ArrayIndexOutOfBoundsException e) {
    132             throw new ConditionThrowable(new TypeError("bad array dimension"));
     134            signal(new TypeError("bad array dimension"));
     135            // Not reached.
     136            return 0;
    133137        }
    134138    }
     
    148152        if (index >= 0 && index < size)
    149153            return array.getRowMajor(index + offset);
    150         throw new ConditionThrowable(new TypeError("bad row major index " + index));
     154        return signal(new TypeError("bad row major index " + index));
    151155    }
    152156
     
    156160            array.setRowMajor(index + offset, newValue);
    157161        else
    158             throw new ConditionThrowable(new TypeError("bad row major index " + index));
     162            signal(new TypeError("bad row major index " + index));
    159163    }
    160164
  • trunk/j/src/org/armedbear/lisp/FillPointerOutputStream.java

    r3884 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: FillPointerOutputStream.java,v 1.3 2003-09-19 11:50:18 piso Exp $
     5 * $Id: FillPointerOutputStream.java,v 1.4 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4040            LispString string = checkString(arg);
    4141            if (string.getFillPointer() < 0)
    42                 throw new ConditionThrowable(new TypeError(arg, "string with a fill pointer"));
     42                return signal(new TypeError(arg, "string with a fill pointer"));
    4343            return new FillPointerOutputStream(string);
    4444        }
  • trunk/j/src/org/armedbear/lisp/GenericFunction.java

    r4593 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: GenericFunction.java,v 1.3 2003-11-01 19:11:27 piso Exp $
     5 * $Id: GenericFunction.java,v 1.4 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    110110            if (arg instanceof GenericFunction)
    111111                return ((GenericFunction)arg).getDiscriminatingFunction();
    112             throw new ConditionThrowable(new TypeError(arg, "generic function"));
     112            return signal(new TypeError(arg, "generic function"));
    113113        }
    114114    };
     
    124124                return second;
    125125            }
    126             throw new ConditionThrowable(new TypeError(first, "generic function"));
     126            return signal(new TypeError(first, "generic function"));
    127127        }
    128128    };
  • trunk/j/src/org/armedbear/lisp/JHandler.java

    r4767 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: JHandler.java,v 1.4 2003-11-15 15:42:55 asimon Exp $
     5 * $Id: JHandler.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    8282        {
    8383            if (args.length != 5)
    84                 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     84                return signal(new WrongNumberOfArgumentsException(this));
    8585            Map entryTable = null;
    8686            Object object = args[0].javaInstance();
     
    9393            }
    9494            Entry entry = new Entry((Function) args[2], args[3], event, entryTable);
    95             if (args[4] != NIL) entry.addCount(((Fixnum)args[4]).getValue());
     95            if (args[4] != NIL)
     96                entry.addCount(((Fixnum)args[4]).getValue());
    9697            entryTable.put(event,entry);
    9798            return T;
  • trunk/j/src/org/armedbear/lisp/LispThread.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: LispThread.java,v 1.26 2003-12-09 20:26:22 asimon Exp $
     5 * $Id: LispThread.java,v 1.27 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    451451                ((LispFloat)arg.multiplyBy(new LispFloat(1000))).getValue();
    452452            if (d < 0)
    453                 throw new ConditionThrowable(new TypeError(arg, "non-negative real"));
     453                return signal(new TypeError(arg, "non-negative real"));
    454454            long millis = d < Long.MAX_VALUE ? (long) d : Long.MAX_VALUE;
    455455            try {
     
    491491                return T;
    492492            } else
    493                 throw new ConditionThrowable(new TypeError(arg, "Lisp thread"));
     493                return signal(new TypeError(arg, "Lisp thread"));
    494494        }
    495495    };
     
    512512        {
    513513            if (args.length > 1)
    514                 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     514                return signal(new WrongNumberOfArgumentsException(this));
    515515            int count = args.length > 0 ? Fixnum.getValue(args[0]) : 0;
    516516            LispThread thread = currentThread();
     
    528528        {
    529529            if (args.length > 1)
    530                 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     530                return signal(new WrongNumberOfArgumentsException(this));
    531531            int count = args.length > 0 ? Fixnum.getValue(args[0]) : 0;
    532532            LispThread thread = currentThread();
  • trunk/j/src/org/armedbear/lisp/PackageError.java

    r5084 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: PackageError.java,v 1.9 2003-12-12 13:18:50 piso Exp $
     5 * $Id: PackageError.java,v 1.10 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7878            if (arg instanceof PackageError)
    7979                return ((PackageError)arg).pkg;
    80             throw new ConditionThrowable(new TypeError(arg, Symbol.PACKAGE_ERROR));
     80            else
     81                return signal(new TypeError(arg, Symbol.PACKAGE_ERROR));
    8182        }
    8283    };
  • trunk/j/src/org/armedbear/lisp/Pathname.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Pathname.java,v 1.20 2003-12-09 20:26:22 asimon Exp $
     5 * $Id: Pathname.java,v 1.21 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    110110            if (arg instanceof Pathname)
    111111                return new LispString(((Pathname)arg).getNamestring());
    112             throw new ConditionThrowable(new TypeError(arg, "pathname designator"));
     112            return signal(new TypeError(arg, "pathname designator"));
    113113        }
    114114    };
     
    128128                namestring = ((Pathname)arg).getNamestring();
    129129            else
    130                 throw new ConditionThrowable(new TypeError(arg, "pathname designator"));
     130                return signal(new TypeError(arg, "pathname designator"));
    131131            if (namestring != null) {
    132132                for (int i = namestring.length(); i-- > 0;) {
     
    151151            if (arg instanceof LispString)
    152152                return new Pathname(((LispString)arg).getValue());
    153             throw new ConditionThrowable(new TypeError(arg, "pathname designator"));
     153            return signal(new TypeError(arg, "pathname designator"));
    154154        }
    155155    };
     
    165165        {
    166166            if (args.length != 8)
    167                 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     167                return signal(new WrongNumberOfArgumentsException(this));
    168168            LispObject host = args[0];
    169169            LispObject device = args[1];
     
    176176            // FIXME
    177177            if (host != NIL || device != NIL || directory != NIL)
    178                 throw new ConditionThrowable(new LispError("MAKE-PATHNAME: not implemented"));
     178                return signal(new LispError("MAKE-PATHNAME: not implemented"));
    179179            String d = ""; // directory
    180180            String n = ""; // name
     
    229229                namestring = ((Pathname)arg).getNamestring();
    230230            else
    231                 throw new ConditionThrowable(new TypeError(arg, "pathname designator"));
     231                return signal(new TypeError(arg, "pathname designator"));
    232232            if (namestring != null) {
    233233                for (int i = namestring.length(); i-- > 0;) {
     
    265265                    return NIL;
    266266                default:
    267                     throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     267                    return signal(new WrongNumberOfArgumentsException(this));
    268268            }
    269269        }
  • trunk/j/src/org/armedbear/lisp/Profiler.java

    r4752 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Profiler.java,v 1.2 2003-11-14 17:55:17 piso Exp $
     5 * $Id: Profiler.java,v 1.3 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6565                    sampling = false;
    6666                else
    67                     throw new ConditionThrowable(new LispError(
     67                    return signal(new LispError(
    6868                        "%START-PROFILER: argument must be either :TIME or :COUNT-ONLY"));
    6969                Package[] packages = Packages.getAllPackages();
  • trunk/j/src/org/armedbear/lisp/SimpleCondition.java

    r5097 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: SimpleCondition.java,v 1.7 2003-12-12 16:15:42 piso Exp $
     5 * $Id: SimpleCondition.java,v 1.8 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7373            if (arg instanceof Condition)
    7474                return ((Condition)arg).getFormatControl();
    75             throw new ConditionThrowable(new TypeError(arg, Symbol.CONDITION));
     75            return signal(new TypeError(arg, Symbol.CONDITION));
    7676        }
    7777    };
     
    8585            if (arg instanceof Condition)
    8686                return ((Condition)arg).getFormatArguments();
    87             throw new ConditionThrowable(new TypeError(arg, Symbol.CONDITION));
     87            return signal(new TypeError(arg, Symbol.CONDITION));
    8888        }
    8989    };
  • trunk/j/src/org/armedbear/lisp/StandardObject.java

    r5069 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: StandardObject.java,v 1.11 2003-12-11 19:15:23 piso Exp $
     5 * $Id: StandardObject.java,v 1.12 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    105105            if (arg instanceof StandardObject)
    106106                return ((StandardObject)arg).layout;
    107             throw new ConditionThrowable(new TypeError(arg, "standard object"));
     107            return signal(new TypeError(arg, "standard object"));
    108108        }
    109109    };
     
    122122            catch (ClassCastException e) {
    123123                if (!(first instanceof StandardObject))
    124                     throw new ConditionThrowable(new TypeError(first, "standard object"));
     124                    return signal(new TypeError(first, "standard object"));
    125125                if (!(second instanceof Layout))
    126                     throw new ConditionThrowable(new TypeError(second, "layout"));
     126                    return signal(new TypeError(second, "layout"));
    127127                // Not reached.
    128128                return NIL;
     
    139139            if (arg instanceof StandardObject)
    140140                return ((StandardObject)arg).layout.getLispClass();
    141             throw new ConditionThrowable(new TypeError(arg, "standard object"));
     141            return signal(new TypeError(arg, "standard object"));
    142142        }
    143143    };
     
    151151            if (arg instanceof StandardObject)
    152152                return ((StandardObject)arg).slots;
    153             throw new ConditionThrowable(new TypeError(arg, "standard object"));
     153            return signal(new TypeError(arg, "standard object"));
    154154        }
    155155    };
     
    166166                return second;
    167167            }
    168             throw new ConditionThrowable(new TypeError(first, "standard object"));
     168            return signal(new TypeError(first, "standard object"));
    169169        }
    170170    };
     
    193193                return new StandardObject((LispClass)first, second);
    194194            }
    195             throw new ConditionThrowable(new TypeError(first, "class"));
     195            return signal(new TypeError(first, "class"));
    196196        }
    197197    };
  • trunk/j/src/org/armedbear/lisp/Time.java

    r5045 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Time.java,v 1.15 2003-12-10 07:20:47 asimon Exp $
     5 * $Id: Time.java,v 1.16 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9696                namestring = ((Pathname)arg).getNamestring();
    9797            else
    98                 throw new ConditionThrowable(new TypeError(arg, "pathname designator"));
     98                return signal(new TypeError(arg, "pathname designator"));
    9999            File file = new File(namestring);
    100100            long lastModified = file.lastModified();
  • trunk/j/src/org/armedbear/lisp/TwoWayStream.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: TwoWayStream.java,v 1.8 2003-12-09 20:26:23 asimon Exp $
     5 * $Id: TwoWayStream.java,v 1.9 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7777        {
    7878            if (!(first instanceof LispInputStream))
    79                 throw new ConditionThrowable(new TypeError(first, "input stream"));
     79                return signal(new TypeError(first, "input stream"));
    8080            if (!(second instanceof LispOutputStream))
    81                 throw new ConditionThrowable(new TypeError(second, "output stream"));
     81                return signal(new TypeError(second, "output stream"));
    8282            return new TwoWayStream((LispInputStream) first,
    8383                                    (LispOutputStream) second);
     
    9393            if (arg instanceof TwoWayStream)
    9494                return ((TwoWayStream)arg).getInputStream();
    95             throw new ConditionThrowable(new TypeError(arg, "two-way-stream"));
     95            return signal(new TypeError(arg, "two-way-stream"));
    9696        }
    9797    };
     
    105105            if (arg instanceof TwoWayStream)
    106106                return ((TwoWayStream)arg).getOutputStream();
    107             throw new ConditionThrowable(new TypeError(arg, "two-way-stream"));
     107            return signal(new TypeError(arg, "two-way-stream"));
    108108        }
    109109    };
  • trunk/j/src/org/armedbear/lisp/ash.java

    r5047 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: ash.java,v 1.3 2003-12-10 08:12:43 asimon Exp $
     5 * $Id: ash.java,v 1.4 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5656            n = ((Bignum)first).getValue();
    5757        else
    58             throw new ConditionThrowable(new TypeError(first, "integer"));
     58            return signal(new TypeError(first, "integer"));
    5959        if (second instanceof Fixnum) {
    6060            int count = Fixnum.getInt(second);
     
    7070            BigInteger count = ((Bignum)second).getValue();
    7171            if (count.signum() > 0)
    72                 throw new ConditionThrowable(new LispError("can't represent result of left shift"));
     72                return signal(new LispError("can't represent result of left shift"));
    7373            if (count.signum() < 0)
    7474                return n.signum() >= 0 ? Fixnum.ZERO : Fixnum.MINUS_ONE;
    7575            Debug.bug(); // Shouldn't happen.
    7676        }
    77         throw new ConditionThrowable(new TypeError(second, "integer"));
     77        return signal(new TypeError(second, "integer"));
    7878    }
    7979
  • trunk/j/src/org/armedbear/lisp/assq.java

    r4367 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: assq.java,v 1.1 2003-10-14 16:02:27 piso Exp $
     5 * $Id: assq.java,v 1.2 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3939                    return cons;
    4040            } else if (cons != NIL)
    41                 throw new ConditionThrowable(new TypeError(cons, "list"));
     41                return signal(new TypeError(cons, "list"));
    4242            alist = alist.cdr();
    4343        }
  • trunk/j/src/org/armedbear/lisp/assql.java

    r4875 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: assql.java,v 1.1 2003-11-23 18:56:40 piso Exp $
     5 * $Id: assql.java,v 1.2 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3939                    return cons;
    4040            } else if (cons != NIL)
    41                 throw new ConditionThrowable(new TypeError(cons, "list"));
     41                return signal(new TypeError(cons, "list"));
    4242            alist = alist.cdr();
    4343        }
  • trunk/j/src/org/armedbear/lisp/cell_error_name.java

    r3948 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: cell_error_name.java,v 1.1 2003-09-21 02:00:21 piso Exp $
     5 * $Id: cell_error_name.java,v 1.2 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3535        if (arg instanceof CellError)
    3636            return ((CellError)arg).getCellName();
    37         throw new ConditionThrowable(new TypeError(arg, "CELL-ERROR"));
     37        return signal(new TypeError(arg, "CELL-ERROR"));
    3838    }
    3939
  • trunk/j/src/org/armedbear/lisp/coerce.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: coerce.java,v 1.9 2003-12-09 20:26:23 asimon Exp $
     5 * $Id: coerce.java,v 1.10 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4343                        return LispCharacter.getInstance(name.charAt(0));
    4444                }
    45                 throw new ConditionThrowable(new TypeError());
     45                return signal(new TypeError());
    4646            }
    4747            if (second == Symbol.FLOAT || second == Symbol.SINGLE_FLOAT ||
     
    5656                    return first;
    5757                }
    58                 throw new ConditionThrowable(new TypeError(first, "number"));
     58                return signal(new TypeError(first, "number"));
    5959            }
    6060            if (first instanceof AbstractVector) {
     
    126126                    if (obj instanceof Function) {
    127127                        if (obj instanceof SpecialOperator)
    128                             throw new ConditionThrowable(new TypeError());
     128                            return signal(new TypeError());
    129129                        return obj;
    130130                    }
    131131                }
    132132            }
    133             throw new ConditionThrowable(new TypeError());
     133            return signal(new TypeError());
    134134        }
    135135    };
  • trunk/j/src/org/armedbear/lisp/describe.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: describe.java,v 1.10 2003-12-09 20:26:23 asimon Exp $
     5 * $Id: describe.java,v 1.11 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3030        {
    3131            if (args.length != 1)
    32                 throw new ConditionThrowable(new WrongNumberOfArgumentsException(this));
     32                return signal(new WrongNumberOfArgumentsException(this));
    3333            LispObject obj = args[0];
    3434            StringBuffer sb = new StringBuffer(String.valueOf(obj));
  • trunk/j/src/org/armedbear/lisp/dotimes.java

    r4843 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: dotimes.java,v 1.4 2003-11-19 17:33:04 piso Exp $
     5 * $Id: dotimes.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    190190                result = eval(resultForm, ext, thread);
    191191            } else
    192                 throw new ConditionThrowable(new TypeError(limit, "integer"));
     192                return signal(new TypeError(limit, "integer"));
    193193            return result;
    194194        }
  • trunk/j/src/org/armedbear/lisp/last.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: last.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: last.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7575            return result;
    7676        }
    77         throw new ConditionThrowable(new TypeError(second, "non-negative integer"));
     77        return signal(new TypeError(second, "non-negative integer"));
    7878    }
    7979
  • trunk/j/src/org/armedbear/lisp/logand.java

    r5047 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logand.java,v 1.6 2003-12-10 08:12:43 asimon Exp $
     5 * $Id: logand.java,v 1.7 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5151                n1 = ((Bignum)first).getValue();
    5252            else
    53                 throw new ConditionThrowable(new TypeError(first, "integer"));
     53                return signal(new TypeError(first, "integer"));
    5454            if (second instanceof Fixnum)
    5555                n2 = ((Fixnum)second).getBigInteger();
     
    5757                n2 = ((Bignum)second).getValue();
    5858            else
    59                 throw new ConditionThrowable(new TypeError(second, "integer"));
     59                return signal(new TypeError(second, "integer"));
    6060            return number(n1.and(n2));
    6161        }
     
    7171                n = ((Bignum)args[i]).getValue();
    7272            else
    73                 throw new ConditionThrowable(new TypeError(args[i], "integer"));
     73                return signal(new TypeError(args[i], "integer"));
    7474            result = result.and(n);
    7575        }
  • trunk/j/src/org/armedbear/lisp/logandc1.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logandc1.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logandc1.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4343                return number(n1.not().and(n2));
    4444            }
    45             throw new ConditionThrowable(new TypeError(second, "integer"));
     45            return signal(new TypeError(second, "integer"));
    4646        }
    4747        if (first instanceof Bignum) {
     
    5555                return number(n1.not().and(n2));
    5656            }
    57             throw new ConditionThrowable(new TypeError(second, "integer"));
     57            return signal(new TypeError(second, "integer"));
    5858        }
    59         throw new ConditionThrowable(new TypeError(first, "integer"));
     59        return signal(new TypeError(first, "integer"));
    6060    }
    6161
  • trunk/j/src/org/armedbear/lisp/logandc2.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logandc2.java,v 1.5 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logandc2.java,v 1.6 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646                return number(n1.and(n2.not()));
    4747            }
    48             throw new ConditionThrowable(new TypeError(second, "integer"));
     48            return signal(new TypeError(second, "integer"));
    4949        }
    5050        if (first instanceof Bignum) {
     
    5858                return number(n1.and(n2.not()));
    5959            }
    60             throw new ConditionThrowable(new TypeError(second, "integer"));
     60            return signal(new TypeError(second, "integer"));
    6161        }
    62         throw new ConditionThrowable(new TypeError(first, "integer"));
     62        return signal(new TypeError(first, "integer"));
    6363    }
    6464
  • trunk/j/src/org/armedbear/lisp/logbitp.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logbitp.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logbitp.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646        }
    4747        if (index < 0)
    48             throw new ConditionThrowable(new TypeError(first, "non-negative integer"));
     48            return signal(new TypeError(first, "non-negative integer"));
    4949        BigInteger n;
    5050        if (second instanceof Fixnum)
     
    5353            n = ((Bignum)second).getValue();
    5454        else
    55             throw new ConditionThrowable(new TypeError(second, "integer"));
     55            return signal(new TypeError(second, "integer"));
    5656        // FIXME See above.
    5757        if (index == Integer.MAX_VALUE)
  • trunk/j/src/org/armedbear/lisp/logcount.java

    r5047 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logcount.java,v 1.2 2003-12-10 08:12:43 asimon Exp $
     5 * $Id: logcount.java,v 1.3 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4242            n = ((Bignum)arg).getValue();
    4343        else
    44             throw new ConditionThrowable(new TypeError(arg, "integer"));
     44            return signal(new TypeError(arg, "integer"));
    4545        return new Fixnum(n.bitCount());
    4646    }
  • trunk/j/src/org/armedbear/lisp/logeqv.java

    r5047 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logeqv.java,v 1.4 2003-12-10 08:12:43 asimon Exp $
     5 * $Id: logeqv.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4545        if (arg instanceof Bignum)
    4646            return arg;
    47         throw new ConditionThrowable(new TypeError(arg, "integer"));
     47        return signal(new TypeError(arg, "integer"));
    4848    }
    4949
     
    5959                n = ((Bignum)arg).getValue();
    6060            else
    61                 throw new ConditionThrowable(new TypeError(arg, "integer"));
     61                return signal(new TypeError(arg, "integer"));
    6262            if (result == null)
    6363                result = n;
  • trunk/j/src/org/armedbear/lisp/logior.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logior.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logior.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5151                n1 = ((Bignum)first).getValue();
    5252            else
    53                 throw new ConditionThrowable(new TypeError(first, "integer"));
     53                return signal(new TypeError(first, "integer"));
    5454            if (second instanceof Fixnum)
    5555                n2 = ((Fixnum)second).getBigInteger();
     
    5757                n2 = ((Bignum)second).getValue();
    5858            else
    59                 throw new ConditionThrowable(new TypeError(second, "integer"));
     59                return signal(new TypeError(second, "integer"));
    6060            return number(n1.or(n2));
    6161        }
     
    7171                n = ((Bignum)args[i]).getValue();
    7272            else
    73                 throw new ConditionThrowable(new TypeError(args[i], "integer"));
     73                return signal(new TypeError(args[i], "integer"));
    7474            result = result.or(n);
    7575        }
  • trunk/j/src/org/armedbear/lisp/lognand.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: lognand.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: lognand.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4343                return number(n1.and(n2).not());
    4444            }
    45             throw new ConditionThrowable(new TypeError(second, "integer"));
     45            return signal(new TypeError(second, "integer"));
    4646        }
    4747        if (first instanceof Bignum) {
     
    5555                return number(n1.and(n2).not());
    5656            }
    57             throw new ConditionThrowable(new TypeError(second, "integer"));
     57            return signal(new TypeError(second, "integer"));
    5858        }
    59         throw new ConditionThrowable(new TypeError(first, "integer"));
     59        return signal(new TypeError(first, "integer"));
    6060    }
    6161
  • trunk/j/src/org/armedbear/lisp/lognor.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: lognor.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: lognor.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4343                return number(n1.or(n2).not());
    4444            }
    45             throw new ConditionThrowable(new TypeError(second, "integer"));
     45            return signal(new TypeError(second, "integer"));
    4646        }
    4747        if (first instanceof Bignum) {
     
    5555                return number(n1.or(n2).not());
    5656            }
    57             throw new ConditionThrowable(new TypeError(second, "integer"));
     57            return signal(new TypeError(second, "integer"));
    5858        }
    59         throw new ConditionThrowable(new TypeError(first, "integer"));
     59        return signal(new TypeError(first, "integer"));
    6060    }
    6161
  • trunk/j/src/org/armedbear/lisp/lognot.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: lognot.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: lognot.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3838        if (arg instanceof Bignum)
    3939            return number(((Bignum)arg).getValue().not());
    40         throw new ConditionThrowable(new TypeError(arg, "integer"));
     40        return signal(new TypeError(arg, "integer"));
    4141    }
    4242
  • trunk/j/src/org/armedbear/lisp/logorc1.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logorc1.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logorc1.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646                return number(n1.not().or(n2));
    4747            }
    48             throw new ConditionThrowable(new TypeError(second, "integer"));
     48            return signal(new TypeError(second, "integer"));
    4949        }
    5050        if (first instanceof Bignum) {
     
    5858                return number(n1.not().or(n2));
    5959            }
    60             throw new ConditionThrowable(new TypeError(second, "integer"));
     60            return signal(new TypeError(second, "integer"));
    6161        }
    62         throw new ConditionThrowable(new TypeError(first, "integer"));
     62        return signal(new TypeError(first, "integer"));
    6363    }
    6464
  • trunk/j/src/org/armedbear/lisp/logorc2.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logorc2.java,v 1.4 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logorc2.java,v 1.5 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646                return number(n1.or(n2.not()));
    4747            }
    48             throw new ConditionThrowable(new TypeError(second, "integer"));
     48            return signal(new TypeError(second, "integer"));
    4949        }
    5050        if (first instanceof Bignum) {
     
    5858                return number(n1.or(n2.not()));
    5959            }
    60             throw new ConditionThrowable(new TypeError(second, "integer"));
     60            return signal(new TypeError(second, "integer"));
    6161        }
    62         throw new ConditionThrowable(new TypeError(first, "integer"));
     62        return signal(new TypeError(first, "integer"));
    6363    }
    6464
  • trunk/j/src/org/armedbear/lisp/logtest.java

    r5047 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logtest.java,v 1.2 2003-12-10 08:12:43 asimon Exp $
     5 * $Id: logtest.java,v 1.3 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646                n1 = ((Bignum)first).getValue();
    4747            else
    48                 throw new ConditionThrowable(new TypeError(first, "integer"));
     48                return signal(new TypeError(first, "integer"));
    4949            if (second instanceof Fixnum)
    5050                n2 = ((Fixnum)second).getBigInteger();
     
    5252                n2 = ((Bignum)second).getValue();
    5353            else
    54                 throw new ConditionThrowable(new TypeError(second, "integer"));
     54                return signal(new TypeError(second, "integer"));
    5555            return n1.and(n2).signum() == 0 ? NIL : T;
    5656        }
  • trunk/j/src/org/armedbear/lisp/logxor.java

    r5048 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: logxor.java,v 1.3 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: logxor.java,v 1.4 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4545        if (arg instanceof Bignum)
    4646            return arg;
    47         throw new ConditionThrowable(new TypeError(arg, "integer"));
     47        return signal(new TypeError(arg, "integer"));
    4848    }
    4949
     
    5959                n = ((Bignum)arg).getValue();
    6060            else
    61                 throw new ConditionThrowable(new TypeError(arg, "integer"));
     61                return signal(new TypeError(arg, "integer"));
    6262            if (result == null)
    6363                result = n;
  • trunk/j/src/org/armedbear/lisp/open.java

    r4437 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: open.java,v 1.8 2003-10-17 17:32:10 piso Exp $
     5 * $Id: open.java,v 1.9 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4343            } else if (ifExists == Keyword.ERROR) {
    4444                if (file.exists())
    45                     throw new ConditionThrowable(new LispError("file already exists: " + first));
     45                    return signal(new LispError("file already exists: " + first));
    4646            } else if (ifExists == NIL) {
    4747                if (file.exists())
     
    4949            } else {
    5050                // FIXME
    51                 throw new ConditionThrowable(new LispError(String.valueOf(ifExists)) +
    52                                              " is not a recognized value for :IF-EXISTS");
     51                return signal(new LispError(String.valueOf(ifExists) +
     52                                            " is not a recognized value for :IF-EXISTS"));
    5353            }
    5454            try {
     
    5959            }
    6060            catch (FileNotFoundException e) {
    61                 throw new ConditionThrowable(new LispError("unable to create file: " + first));
     61                return signal(new LispError("unable to create file: " + first));
    6262            }
    6363        }
     
    7979            }
    8080            catch (FileNotFoundException e) {
    81                 throw new ConditionThrowable(new LispError("file not found: " + first));
     81                return signal(new LispError("file not found: " + first));
    8282            }
    8383        }
     
    101101            }
    102102        }
    103         throw new ConditionThrowable(new LispError(String.valueOf(elementType) +
    104                                                    " is not a valid stream element type"));
     103        signal(new LispError(String.valueOf(elementType) + " is not a valid stream element type"));
     104        // Not reached.
     105        return false;
    105106    }
    106107}
  • trunk/j/src/org/armedbear/lisp/probe_file.java

    r5037 r5114  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: probe_file.java,v 1.8 2003-12-09 20:26:23 asimon Exp $
     5 * $Id: probe_file.java,v 1.9 2003-12-13 00:58:51 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4040            }
    4141            catch (IOException e) {
    42                 throw new ConditionThrowable(new LispError(e.getMessage()));
     42                return signal(new LispError(e.getMessage()));
    4343            }
    4444        }
     
    5959            }
    6060            catch (IOException e) {
    61                 throw new ConditionThrowable(new LispError(e.getMessage()));
     61                return signal(new LispError(e.getMessage()));
    6262            }
    6363        }
Note: See TracChangeset for help on using the changeset viewer.