Changeset 3895


Ignore:
Timestamp:
09/19/03 14:55:06 (19 years ago)
Author:
piso
Message:

Conditions: work in progress.

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

Legend:

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

    r3888 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: ArithmeticError.java,v 1.3 2003-09-19 12:43:59 piso Exp $
     5 * $Id: ArithmeticError.java,v 1.4 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class ArithmeticError extends Condition
     24public class ArithmeticError extends LispError
    2525{
    2626    public ArithmeticError()
     
    3737        if (type == Symbol.ARITHMETIC_ERROR)
    3838            return T;
    39         if (type == Symbol.ERROR)
    40             return T;
    4139        return super.typep(type);
    4240    }
  • trunk/j/src/org/armedbear/lisp/Condition.java

    r3888 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Condition.java,v 1.5 2003-09-19 12:43:59 piso Exp $
     5 * $Id: Condition.java,v 1.6 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public class Condition extends LispObject
    2525{
    26     private String message;
     26    private final String message;
    2727
    2828    public Condition()
    2929    {
     30        message = null;
    3031    }
    3132
     
    3334    {
    3435        this.message = message;
     36    }
     37
     38    public String getMessage()
     39    {
     40        return message;
    3541    }
    3642
  • trunk/j/src/org/armedbear/lisp/ControlError.java

    r3889 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: ControlError.java,v 1.2 2003-09-19 13:02:43 piso Exp $
     5 * $Id: ControlError.java,v 1.3 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class ControlError extends Condition
     24public class ControlError extends LispError
    2525{
    2626    public ControlError()
     
    3737        if (type == Symbol.CONTROL_ERROR)
    3838            return T;
    39         if (type == Symbol.ERROR)
    40             return T;
    4139        return super.typep(type);
    4240    }
  • trunk/j/src/org/armedbear/lisp/LispError.java

    r3894 r3895  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispError.java,v 1.3 2003-09-19 14:44:10 piso Exp $
     5 * $Id: LispError.java,v 1.4 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2626    public LispError()
    2727    {
    28         super();
    2928    }
    3029
  • trunk/j/src/org/armedbear/lisp/PackageError.java

    r3888 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: PackageError.java,v 1.3 2003-09-19 12:43:59 piso Exp $
     5 * $Id: PackageError.java,v 1.4 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class PackageError extends Condition
     24public class PackageError extends LispError
    2525{
    2626    public PackageError()
     
    3737        if (type == Symbol.PACKAGE_ERROR)
    3838            return T;
    39         if (type == Symbol.ERROR)
    40             return T;
    4139        return super.typep(type);
    4240    }
  • trunk/j/src/org/armedbear/lisp/ParseError.java

    r3888 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: ParseError.java,v 1.4 2003-09-19 12:43:59 piso Exp $
     5 * $Id: ParseError.java,v 1.5 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class ParseError extends Condition
     24public class ParseError extends LispError
    2525{
    2626    public ParseError(String message)
     
    3333        if (type == Symbol.PARSE_ERROR)
    3434            return T;
    35         if (type == Symbol.ERROR)
    36             return T;
    3735        return super.typep(type);
    3836    }
  • trunk/j/src/org/armedbear/lisp/ProgramError.java

    r3888 r3895  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: ProgramError.java,v 1.6 2003-09-19 12:43:59 piso Exp $
     5 * $Id: ProgramError.java,v 1.7 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class ProgramError extends Condition
     24public class ProgramError extends LispError
    2525{
    2626    public ProgramError()
     
    3737        if (type == Symbol.PROGRAM_ERROR)
    3838            return T;
    39         if (type == Symbol.ERROR)
    40             return T;
    4139        return super.typep(type);
    4240    }
  • trunk/j/src/org/armedbear/lisp/StreamError.java

    r3888 r3895  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: StreamError.java,v 1.5 2003-09-19 12:43:59 piso Exp $
     5 * $Id: StreamError.java,v 1.6 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public class StreamError extends Condition
     24public class StreamError extends LispError
    2525{
    2626    private Throwable cause;
     
    4343    public LispObject typep(LispObject type) throws ConditionThrowable
    4444    {
    45         if (type == Symbol.ERROR)
    46             return T;
    4745        if (type == Symbol.STREAM_ERROR)
    4846            return T;
  • trunk/j/src/org/armedbear/lisp/TypeError.java

    r3885 r3895  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: TypeError.java,v 1.4 2003-09-19 12:10:28 piso Exp $
     5 * $Id: TypeError.java,v 1.5 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public final class TypeError extends Condition
     24public final class TypeError extends LispError
    2525{
    26     private final String message;
    2726    private final LispObject object;
    2827    private final String expectedType;
     
    3534    public TypeError(String message)
    3635    {
    37         this.message = message;
     36        super(message);
    3837        object = null;
    3938        expectedType = null;
     
    4746    public TypeError(LispObject object, String expectedType)
    4847    {
    49         message = null;
    5048        this.object = object;
    5149        this.expectedType = expectedType;
     
    5452    public LispObject typep(LispObject type) throws ConditionThrowable
    5553    {
    56         if (type == Symbol.TYPE_ERROR)
    57             return T;
    5854        if (type == Symbol.ERROR)
    5955            return T;
     
    6359    public String getMessage()
    6460    {
    65         if (message != null)
    66             return message;
     61        String s = super.getMessage();
     62        if (s != null)
     63            return s;
    6764        StringBuffer sb = new StringBuffer("wrong type");
    6865        String name = object != null ? String.valueOf(object) : null;
  • trunk/j/src/org/armedbear/lisp/UnboundVariableException.java

    r3885 r3895  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: UnboundVariableException.java,v 1.3 2003-09-19 12:10:28 piso Exp $
     5 * $Id: UnboundVariableException.java,v 1.4 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public final class UnboundVariableException extends Condition
     24public final class UnboundVariableException extends LispError
    2525{
    2626    private final String name;
     
    4242        if (type == Symbol.UNBOUND_VARIABLE)
    4343            return T;
    44         if (type == Symbol.ERROR)
    45             return T;
    4644        return super.typep(type);
    4745    }
  • trunk/j/src/org/armedbear/lisp/UndefinedFunctionError.java

    r3885 r3895  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: UndefinedFunctionError.java,v 1.3 2003-09-19 12:10:28 piso Exp $
     5 * $Id: UndefinedFunctionError.java,v 1.4 2003-09-19 14:55:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 public final class UndefinedFunctionError extends Condition
     24public final class UndefinedFunctionError extends LispError
    2525{
    2626    private final LispObject object;
     
    4949        if (type == Symbol.UNDEFINED_FUNCTION)
    5050            return T;
    51         if (type == Symbol.ERROR)
    52             return T;
    5351        return super.typep(type);
    5452    }
Note: See TracChangeset for help on using the changeset viewer.