Why dont dlang check NullPointer?
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 26 20:49:42 PDT 2015
On Friday, 27 March 2015 at 03:46:49 UTC, zhmt wrote:
> The code above will not print a exception message, but crashes
It actually will throw on Windows and can be tricked into it on
Linux; it is an operating system thing more than a language thing.
> If null exception happens, I hope the server continue running,
> not crash. If the server continue running, the functions
> offered by old modules can be used by users, only the new
> module stop serving.
The best way to do that is to separate the server modules into
independent processes. Then if one crashes, the others keep
running without fear of corruption.
So instead of server modules, try doing mini servers that
communicate with the main server. This is how a lot of newer
programs are written because of the reliability and security
benefits it offers.
More information about the Digitalmars-d