Mercurial > projects > dil
changeset 311:6543ce34a4e0
- Added check for number of entries in messages table.
author | aziz |
---|---|
date | Wed, 15 Aug 2007 17:37:03 +0000 |
parents | f01cdff9db0c |
children | fa0b6f32c1ae |
files | trunk/src/Settings.d |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Settings.d Wed Aug 15 17:20:03 2007 +0000 +++ b/trunk/src/Settings.d Wed Aug 15 17:37:03 2007 +0000 @@ -3,6 +3,7 @@ License: GPL3 +/ module Settings; +import Messages; import Parser, SyntaxTree, Declarations, Expressions; import std.metastrings; @@ -94,6 +95,8 @@ throw new Exception("messages variable is set to "~e.classinfo.name~" instead of an ArrayInitializer."); } } + if (messages.length != MID.max+1) + throw new Exception(std.string.format("messages table in %s must exactly have %d entries, but %s were found.", fileName, MID.max, messages.length)); GlobalSettings.messages = messages; } }