<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_no_error( state, incorrect_msg="Your code generated an error. Fix it and try again!" ):
 """Check whether the submission did not generate a runtime error. Simply use ``Ex().has_no_error()`` in your SCT whenever you want to check for errors. By default, after the entire SCT finished executing, ``sqlwhat`` will check for errors before marking the exercise as correct. You can disable this behavior by using ``Ex().allow_error()``. Args: incorrect_msg: If specified, this overrides the automatically generated feedback message in case the student's query did not return a result. """


    if state.reporter.get_errors():
        state.do_test(incorrect_msg)

    return state