Unreachable code, but reachable with an exception

前端 未结 9 1700
说谎
说谎 2020-12-28 11:22

This code is part of an application that reads from and writes to an ODBC connected database. It creates a record in the database and then checks if a record has been succes

9条回答
  •  爱一瞬间的悲伤
    2020-12-28 11:47

    The last statement return false is unreachable, because the try block is missing a catch part that would handle the exception, so the exception is rethrown after the finally block and the execution never reaches the last statement.

提交回复
热议问题