diff --git a/pyrsistent/_immutable.py b/pyrsistent/_immutable.py
index <HASH>..<HASH> 100644
--- a/pyrsistent/_immutable.py
+++ b/pyrsistent/_immutable.py
@@ -98,6 +98,6 @@ class {class_name}(namedtuple('ImmutableBase', [{quoted_members}]{verbose_string
     try:
         exec(template, namespace)
     except SyntaxError as e:
-        raise SyntaxError(e.message + ':\n' + template) from e
+        raise SyntaxError(str(e) + ':\n' + template) from e
 
     return namespace[name]
Stop using exception.message

<URL>. As of Python <I>, exception.message was dropped, and attempting to access it causes an error.