It could be good in some cases if the package returned easily testable pre-defined(and exported package-specific errors for common failure cases, wrapped in a more specific error messages as necessary. Consumers then could test for the common failure cases and provide more user-friendly error messages on UX-visible interfaces.
If we decide to implement this, it probably would be good if we could differentiate between an unmounted resctrlfs and a potential lack of support for resctrlfs in the kernel altogether (missing resctrl from /proc/filesystems, when resctrl is either not enabled at all or it is compiled as a module but not loaded).