code: def has_no_error(
      state, incorrect_msg="Your code generated an error. Fix it and try again!"
  ):
      
  
      if state.reporter.get_errors():
          state.do_test(incorrect_msg)
  
      return state
docs: 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.