Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 57beed7

Browse files
WalterBrightDennis
authored and
Dennis
committedMar 1, 2022
minfo.d is no longer throwing Errors
1 parent 51fd8a1 commit 57beed7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/rt/minfo.d

+4-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct ModuleGroup
109109
// release mode.
110110
if (distance[target] != curdist)
111111
{
112-
throw new Error("internal error printing module cycle");
112+
assert(0, "internal error printing module cycle");
113113
}
114114

115115
// determine the path. This is tricky, because we have to
@@ -196,7 +196,7 @@ struct ModuleGroup
196196
break;
197197
default:
198198
// invalid cycle handling option.
199-
throw new Error("DRT invalid cycle handling option: " ~ cycleHandling);
199+
assert(0, "DRT invalid cycle handling option: " ~ cycleHandling);
200200
}
201201

202202
debug (printModuleDependencies)
@@ -368,7 +368,8 @@ struct ModuleGroup
368368

369369
string errmsg = "";
370370
buildCycleMessage(idx, midx, (string x) {errmsg ~= x;});
371-
throw new Error(errmsg, __FILE__, __LINE__);
371+
assert(0, errmsg);
372+
372373
case ignore:
373374
break;
374375
case print:

0 commit comments

Comments
 (0)
This repository has been archived.