remove default fatel handler

This commit is contained in:
Ivan 2017-10-14 15:46:23 +03:00
parent afe4b9f680
commit b534e59fb8
2 changed files with 1 additions and 7 deletions

View file

@ -18,6 +18,7 @@ void fatal(const Context &context, const std::string &reason)
}
else {
fprintf(stderr, "Runtime compiler fatal: %s\n", reason.c_str());
fflush(stderr);
abort();
}
}

View file

@ -16,7 +16,6 @@ void compileDynamicCode(in CompilerSettings settings = CompilerSettings.init)
context.optLevel = settings.optLevel;
context.sizeLevel = settings.sizeLevel;
context.fatalHandler = &defaultFatalHandler;
if (settings.dumpHandler !is null)
{
context.dumpHandler = &delegateWrapper!(const char*, size_t);
@ -37,12 +36,6 @@ void delegateWrapper(T...)(void* context, T params)
(*del)(params);
}
void defaultFatalHandler(void*, const char* reason)
{
import std.conv;
throw new Error(reason.text.idup);
}
// must be synchronized with cpp
align(1) struct Context
{