from traceback import format_exc

from django.conf import settings


class GraphQLError(Exception):
    def __init__(self, message):
        super(GraphQLError, self).__init__(message)
        self.message = message
        self.location = {'line': 0, 'column': 0}
        if settings.DEBUG:
            print(format_exc().split('/n'))

    def format(self):
        return {'message': self.message}

    def __eq__(self, other):
        return self.__class__ == other.__class__ and self.message == other.message

    def __hash__(self):
        return super(GraphQLError, self).__hash__() + self.message.__hash__()

@@ -213,57 +213,8 @@
 age%0A
-        self.location = %7B'line': 0, 'column': 0%7D%0A
     
@@ -252,14 +252,25 @@
     
-print(
+self.traceback = 
 form
@@ -289,13 +289,12 @@
 it('
-/
+%5C
 n')
-)
 %0A%0A  

Undo error changes for now