CORE-3897: added a macro that can be used to easily define error codes