| … | … | @@ -64,8 +64,8 @@ void ValueOfLink::init(void) |
| 64 | 64 | |
| 65 | 65 | // --------------------------------------------------------------- |
| 66 | 66 | |
| 67 | | /// When executed, this will return the value at the indicated key. |
| 68 | | ValuePtr ValueOfLink::do_execute(AtomSpace* as, bool silent) |
| 67 | /// Return the literal value at the indicated key. |
| 68 | ValuePtr ValueOfLink::get_literal(AtomSpace* as, bool silent) |
| 69 | 69 | { |
| 70 | 70 | // We cannot know the Value of the Atom unless we are |
| 71 | 71 | // working with the unique version that sits in the |
| … | … | @@ -85,6 +85,7 @@ ValuePtr ValueOfLink::do_execute(AtomSpace* as, bool silent) |
| 85 | 85 | Handle ah(as->add_atom(_outgoing[0])); |
| 86 | 86 | Handle ak(as->add_atom(_outgoing[1])); |
| 87 | 87 | |
| 88 | // Get the concrete Atom |
| 88 | 89 | if (ah->is_executable()) |
| 89 | 90 | { |
| 90 | 91 | ValuePtr pap(ah->execute(as, silent)); |
| … | … | @@ -102,7 +103,13 @@ ValuePtr ValueOfLink::do_execute(AtomSpace* as, bool silent) |
| 102 | 103 | ak = as->add_atom(HandleCast(pap)); |
| 103 | 104 | } |
| 104 | 105 | |
| 105 | | ValuePtr pap = ah->getValue(ak); |
| 106 | return ah->getValue(ak); |
| 107 | } |
| 108 | |
| 109 | /// When executed, this will return the value at the indicated key. |
| 110 | ValuePtr ValueOfLink::do_execute(AtomSpace* as, bool silent) |
| 111 | { |
| 112 | ValuePtr pap(get_literal(as, silent)); |
| 106 | 113 | if (pap) |
| 107 | 114 | { |
| 108 | 115 | if (not pap->is_atom()) |
| … | … | @@ -149,8 +156,7 @@ ValuePtr ValueOfLink::do_execute(AtomSpace* as, bool silent) |
| 149 | 156 | throw SilentException(); |
| 150 | 157 | |
| 151 | 158 | throw InvalidParamException(TRACE_INFO, |
| 152 | | "No value at key %s on atom %s", |
| 153 | | ak->to_string().c_str(), ah->to_string().c_str()); |
| 159 | "No value for %s", to_string().c_str()); |
| 154 | 160 | |
| 155 | 161 | return createVoidValue(); |
| 156 | 162 | } |