You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/02/27 02:36:08 UTC

[GitHub] XD-DENG commented on a change in pull request #4783: [AIRFLOW-578] Fix check return code

XD-DENG commented on a change in pull request #4783: [AIRFLOW-578] Fix check return code 
URL: https://github.com/apache/airflow/pull/4783#discussion_r260572424
 
 

 ##########
 File path: airflow/jobs.py
 ##########
 @@ -203,16 +210,19 @@ def run(self):
             make_transient(self)
             self.id = id_
 
+            # Run
             try:
                 self._execute()
                 # In case of max runs or max duration
                 self.state = State.SUCCESS
             except SystemExit:
                 # In case of ^C or SIGTERM
                 self.state = State.SUCCESS
-            except Exception:
+            except Exception as e:
                 self.state = State.FAILED
-                raise
+                self.log.error("Job finished with an exception")
+                self.log.exception(e)
+                self.on_failure(e)
 
 Review comment:
   why not directly call `raise e` here? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services