If the interpreter is given an invalid bf program, such as:
]
It will panic and fail with no information. We detect if a loop is prematurely terminated when the data cell upon exiting a loop is nonzero (because we have to backtrack and find the start of the loop anyway), so this functionality technically already exists and just needs to be extended to cover all cases.