3 ms·
Disallowing exceptions is a company policy, though, not something imposed by the language. I'm not going to go into whether I think it's a good or bad policy, b
by ryandrake 2y ago
Disallowing exceptions is a company policy, though, not something imposed by the language. I'm not going to go into whether I think it's a good or bad policy, but just pointing out that you can write embedded software that properly handles exceptions. Granted, the discipline, will (and yes, budget) to do this is pretty rare in embedded shops.
- PittleyDunkin 2y agoWell, that's rather beside the point—if you're really worried about allocators failing, exceptions don't provide any benefit over simply returning NULL.
- kllrnohj 2y ago> exceptions don't provide any benefit over simply returning NULL. Sure they do - they don't negatively impact the non-error case and don't pollute every function's return value.