def METHOD_NAME(testdata_dir: pathlib.Path, monkeypatch: MonkeyPatch) -> None:
    """Test whether a bad element string correctly errors."""
    element_str = 'catalog'
    full_path = testdata_dir / 'json/minimal_catalog.json'
    command_str = f'trestle partial-object-validate -f {str(full_path)} -e {element_str}'
    monkeypatch.setattr(sys, 'argv', command_str.split())
    monkeypatch.setattr(
        'trestle.core.commands.partial_object_validate.PartialObjectValidate.partial_object_validate',
        test_utils.patch_raise_exception
    )
    rc = Trestle().run()
    assert rc > 0