import mir.exception; try enforce!"Msg"(false); catch(Exception e) assert(e.msg == "Msg");
See Implementation