MDL-63303 core: add debug info to exceptions