it seems that OP wants a kind of compiler switch (or pragma, or attribute) to magically turn `throw` into returning some kind of "error value". and we already has too much dangerous compiler switches like that (even one is too much, and we have two).