I know a similar question has been asked but I feel as though the example wasn't specific enough for me.
Basically I have a Website which utilises a service which supplies various error codes, coupled with this I have errors which can be generated via the Website itself.
Based on errors which can occur, I want to display an appropriate error message to the UI.
As it stands I have 2 separate enumerations to describe the error codes for both areas of concern. I want to provide a nice unified way of doing this.
Im actually a bit stumped as to how do this effectively, I think I am over complicating it in my head.
Certainly here is some psuedo code....
If WebServiceRepsonse.ErrorCode = WebserviceErrorCode.Error
Set a message
If WebSite.ErrorCode = WebsiteErrorCode.Error
Set a message
I want to consolidate the error codes from 2 different sources into 1....