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
|
e.expression = tree
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = "`" + str(tree[0]) + "' " + \
|
msg = "expanding `" + str(tree[0]) + "': " + repr(e)
|
||||||
" ".join(str(e).split()[1:])
|
|
||||||
raise HyMacroExpansionError(tree, msg)
|
raise HyMacroExpansionError(tree, msg)
|
||||||
obj.replace(tree)
|
obj.replace(tree)
|
||||||
return obj
|
return obj
|
||||||
|
Loading…
Reference in New Issue
Block a user