HyMacroExpansionError shouldn't truncate message
For example: ``` $ hy hy 0.10.1 using CPython(default) 2.7.8 on Darwin => (defmacro hi [] (raise (TypeError "This message will be truncated"))) => (hi) File "<input>", line 1, column 1 (hi) ^--^ HyMacroExpansionError: `hi' message will be truncated ````
This commit is contained in:
parent
2fd9c91cd3
commit
6e61f04e46
@ -200,8 +200,7 @@ def macroexpand_1(tree, module_name):
|
||||
e.expression = tree
|
||||
raise
|
||||
except Exception as e:
|
||||
msg = "`" + str(tree[0]) + "' " + \
|
||||
" ".join(str(e).split()[1:])
|
||||
msg = "expanding `" + str(tree[0]) + "': " + repr(e)
|
||||
raise HyMacroExpansionError(tree, msg)
|
||||
obj.replace(tree)
|
||||
return obj
|
||||
|
Loading…
Reference in New Issue
Block a user