diff --git a/source/dub/internal/vibecompat/data/json.d b/source/dub/internal/vibecompat/data/json.d index c352bf3..9d2a7b6 100644 --- a/source/dub/internal/vibecompat/data/json.d +++ b/source/dub/internal/vibecompat/data/json.d @@ -2102,13 +2102,19 @@ private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message = "JSON exception") { - enforceEx!JSONException(cond, message, file, line); + static if (__VERSION__ >= 2079) + enforce!JSONException(cond, message, file, line); + else + enforceEx!JSONException(cond, message, file, line); } private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message, string err_file, int err_line) { auto errmsg() { return format("%s(%s): Error: %s", err_file, err_line+1, message); } - enforceEx!JSONException(cond, errmsg, file, line); + static if (__VERSION__ >= 2079) + enforce!JSONException(cond, errmsg, file, line); + else + enforceEx!JSONException(cond, errmsg, file, line); } private void enforceJson(string file = __FILE__, size_t line = __LINE__)(bool cond, lazy string message, string err_file, int* err_line)