def get_loc(self, classtemplate, error):
        """Get source location information from the error message.
        """
        if isinstance(error, Exception) and hasattr(error, '__traceback__'):
            # traceback is unavailable in py2
            frame_list = traceback.extract_tb(error.__traceback__)
            # Check if length of frame_list is 0
            if len(frame_list) != 0:
                frame = frame_list[-1]
                return "{}:{}".format(frame[0], frame[1])
Get source location information from the error message.
        
numba/core/types/functions.py