[Public] Exceptions helper macros refactored for public library interface

Signed-off-by: Gleb Golubitsky <sectoid@gnolltech.org>