例外について
D言語は例外をサポートしています。しかし、例外を投げるエラーがあったとしてもcgiでは\r\n\r\nを送らないと500エラーになります。なのできちんと大本でキャッチする必要があります。
駄目な例
void test(){
throw new Exception("message");
}
void main(){
test();
}
良い例
import std.stdio;
void test(){
throw new Exception("message");
}
void main(){
try{
test();
}catch(Exception e){
writefln("\n\n%s",e);
}
}