Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an error object to XrdOss. #1913

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/XrdOss/XrdOss.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class XrdSfsAio;
#define XrdOssOK 0
#endif

#define XRDOSS_ERR (XrdMajorVNUM(XrdVNUMBER) > 5)

/******************************************************************************/
/* C l a s s X r d O s s D F */
/******************************************************************************/
Expand Down Expand Up @@ -461,8 +463,10 @@ virtual ~XrdOssDF() {}
//! until the next method call. May return nullptr even if an error occurred.
//-----------------------------------------------------------------------------

#if XrdMajorVNUM(XrdVNUMBER) > 5 || defined(__GNUC__)
#if XRDOSS_ERR
virtual const XrdOucErrInfo *getError() const;
#else
const XrdOucErrInfo *getError() const;
#endif
Copy link
Member

@amadio amadio Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of changing interface in this manner. I think it's better to have a clean patch and add it only in the next major version as mentioned by @abh3 in his previous comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear when the next major version is expected? The level of ugly hacks would likely be different if it's immediately after 5.6 versus waiting until 2024...


protected:
Expand Down Expand Up @@ -926,8 +930,10 @@ virtual ~XrdOss() {}
//! until the next method call. May return nullptr even if an error occurred.
//-----------------------------------------------------------------------------

#if XrdMajorVNUM(XrdVNUMBER) > 5 || defined(__GNUC__)
#if XRDOSS_ERR
virtual const XrdOucErrInfo *getError() const;
#else
const XrdOucErrInfo *getError() const;
#endif

};
Expand Down