Repository navigation
Improve error messages for missing OpenMS data files - #9650
Conversation
When a standard share/OpenMS file (e.g. CHEMISTRY/custom_mods.xml) cannot be located, File::find now throws a FileNotFound whose message also names the resolved OpenMS data directory and where it was resolved from (the OPENMS_DATA_PATH environment variable vs. a compiled-in / executable-relative path). This makes the common root cause -- a stale OPENMS_DATA_PATH or a leftover older OpenMS installation that contains unimod.xml but not the requested file -- immediately diagnosable instead of a bare "could not be found" abort. - FileNotFound gains an optional additional_message argument (defaulted, so all existing 4-arg call sites and their exact-message tests are unaffected). - getOpenMSDataPath() resolution is refactored to also cache a human-readable source description, exposed via the private getOpenMSDataPathSource_(). - Adds a File_test assertion that a missing data file's message mentions the data path and OPENMS_DATA_PATH. Refs #9636 Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01FsXevqRdFSsxxvMtvWPftZ
|
@timosachsenberg The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-23 08:10:36.040385172 +0000
+++ AUTHORS.new 2026-06-23 08:10:41.306368078 +0000
@@ -25,6 +25,7 @@
- Chris Bielow
- Christian Ehrlich
- Christie Mathews
+ - Claude
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesFile::find diagnostic hints for missing shared-data files
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The added '@PARAM additional_message' made Doxygen require docs for ALL parameters of the FileNotFound constructor (file/line/function/filename), emitting a warning that Doxygen_Warning_test treats as a failure. The sibling exception constructors here document none of their (boilerplate) parameters, so demote the note to a plain // comment for consistency. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01FsXevqRdFSsxxvMtvWPftZ
…9650, #9651 (#9652) - Add PR reference (#9650) to the error-message improvement entry (was issue #9636 only) - Add PR reference (#9642) to ProSE end-of-search report entry - Add PR reference (#9643) to PSMFeatureExtractor andes support entry - Add PR reference (#9649) to UniPEFF new-tool entry - Add Build System entry for #9648: Boost.Spirit → charconv, 30-40% faster build - Add Build System entry for #9651: missing <thread> header fix for clang 21+ Claude-Session: https://claude.ai/code/session_01DdyZmN6J65umScGRherQ9W Co-authored-by: Claude <[email protected]>
Description
Enhances error reporting when OpenMS shared-data files cannot be found by including diagnostic information about the resolved data path and its source. This addresses issue #9636 where users with stale or misconfigured
OPENMS_DATA_PATHenvironment variables receive unclear error messages.Changes
Enhanced FileNotFound exception: Added optional
additional_messageparameter toException::FileNotFoundto allow context-specific error details.Refactored data path resolution:
OpenMSDataPath_struct to bundle the resolved path with a human-readable source descriptionresolveOpenMSDataPath_()to centralize thread-safe resolution logicgetOpenMSDataPathSource_()to expose where the data path was resolved fromImproved File::find() error messages: When a file is not found, the exception now includes:
OPENMS_DATA_PATHBetter source descriptions: Updated all data path source labels to be more user-friendly and descriptive (e.g., "the OPENMS_DATA_PATH environment variable" instead of "OPENMS_DATA_PATH (environment)").
Added test coverage: New test case verifies that missing file errors include both the resolved data path and mention of
OPENMS_DATA_PATH.Motivation
Users encountering missing standard data files (e.g.,
CHEMISTRY/custom_mods.xml) now receive actionable diagnostic information instead of a generic "file not found" error, making it easier to troubleshoot installation or configuration issues.Checklist
https://claude.ai/code/session_01FsXevqRdFSsxxvMtvWPftZ
Summary by CodeRabbit
File::findto provide more targeted hints when standard shared-data files are missing.OPENMS_DATA_PATHdetails.