Changeset 3947
- Timestamp:
- 09/21/03 01:57:31 (19 years ago)
- Location:
- trunk/j/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/UnboundVariable.java
r3929 r3947 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: UnboundVariable.java,v 1. 2 2003-09-20 17:02:05piso Exp $5 * $Id: UnboundVariable.java,v 1.3 2003-09-21 01:56:58 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 22 22 package org.armedbear.lisp; 23 23 24 public final class UnboundVariable extends LispError24 public final class UnboundVariable extends CellError 25 25 { 26 private final String name; 27 28 public UnboundVariable(String name) 26 // obj is either the unbound variable itself or an initArgs list. 27 public UnboundVariable(LispObject obj) throws ConditionThrowable 29 28 { 30 this.name = name;29 super(obj instanceof Cons ? obj : list2(Keyword.NAME, obj)); 31 30 } 32 31 33 32 public String getMessage() 34 33 { 35 if (name == null) 36 return "unbound variable"; 37 return "the variable " + name + " has no value"; 34 return "the variable " + getCellName() + " has no value"; 38 35 } 39 36 -
trunk/j/src/org/armedbear/lisp/UndefinedFunction.java
r3945 r3947 3 3 * 4 4 * Copyright (C) 2002-2003 Peter Graves 5 * $Id: UndefinedFunction.java,v 1. 3 2003-09-21 01:41:51 piso Exp $5 * $Id: UndefinedFunction.java,v 1.4 2003-09-21 01:57:31 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 22 22 package org.armedbear.lisp; 23 23 24 public final class UndefinedFunction extends LispError24 public final class UndefinedFunction extends CellError 25 25 { 26 private final LispObject object; 27 private final String name; 28 29 public UndefinedFunction(LispObject object) 26 // obj is either the undefined function itself or an initArgs list. 27 public UndefinedFunction(LispObject obj) throws ConditionThrowable 30 28 { 31 this.object = object; 32 this.name = null; 29 super(obj instanceof Cons ? obj : list2(Keyword.NAME, obj)); 33 30 } 34 31 … … 47 44 if (type == Symbol.UNDEFINED_FUNCTION) 48 45 return T; 46 if (type == BuiltInClass.UNDEFINED_FUNCTION) 47 return T; 49 48 return super.typep(type); 50 49 } … … 53 52 { 54 53 StringBuffer sb = new StringBuffer("undefined function"); 55 if (name != null) { 56 sb.append(' '); 57 sb.append(name); 58 } else if (object != null) { 59 sb.append(' '); 60 sb.append(String.valueOf(object)); 61 } 54 sb.append(' '); 55 sb.append(String.valueOf(getCellName())); 62 56 return sb.toString(); 63 57 }
Note: See TracChangeset
for help on using the changeset viewer.