private void handleCorruptionException(Exception exception, String errorText)
			throws IOException {

		if (exception instanceof ClosedException) {
			// not a corruption exception, but rather it can happen when closing the database
			throw (IOException) exception;
		}

		Msg.error(this, errorText, exception);
		corruptedState = true;
		if (exception instanceof IOException) {
			throw (IOException) exception;
		}
		if (!(exception instanceof RuntimeException)) {
			exception = new RuntimeException(errorText, exception);
		}
		throw (RuntimeException) exception;
	}
Handle exception which indicates a potential corruption of the BufferMgr state
@param exception exception
@param errorText associated error text
@throws IOException exception thrown if instance of IOException
Ghidra/Framework/DB/src/main/java/db/buffers/BufferMgr.java