code: def test_lifecycle_runtime_error(self) -> None:
      result: dict[str, Handler] = {}
  
      def load(filename: str):
          handler = bahs.ServerLifecycleHandler(filename=filename)
          result["handler"] = handler
  
      with_file_contents("raise RuntimeError('nope')", load)
  
      handler = result["handler"]
      assert handler.error is not None
      assert "nope" in handler.error
  
file_path: bokeh/tests/unit/bokeh/application/handlers/test_server_lifecycle.py
imports: from __future__ import annotations
  import pytest
  from bokeh.application.handlers.handler import Handler
  from bokeh.document import Document
  from tests.support.util.filesystem import with_file_contents
  import bokeh.application.handlers.server_lifecycle
label_desc: Use image node_id 2 for calling the Test_ServerLifecycleHandler obj's underlying member method code with example usage: obj.test_lifecycle_runtime_error() without return types