Better diagnosis of URISyntaxException thrown when constructing context menus.