<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_exception(self, exception):
 """An exception occurred in the streaming thread"""

        logger.error('Exception from stream!', exc_info=True)
        self.streaming_exception = exception