aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/locale.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2014-03-01 12:09:41 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2014-03-01 12:09:41 -0500
commit9a3685348d1205cbffeb784df296d55216f512aa (patch)
tree7be097113b7aa54dbbc99b651bb2d355dcbcec40 /core/locale.lua
parentb3be88aed1e8196c5b0490a8e22c5839fdd12e18 (diff)
Use `assert(...)` as a shortcut for `if not ... then error() end`.
Diffstat (limited to 'core/locale.lua')
-rw-r--r--core/locale.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/locale.lua b/core/locale.lua
index fb3f0742..51ff68a6 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -15,7 +15,7 @@ if not f then
if lang then f = io.open(_HOME..'/core/locales/locale.'..lang..'.conf') end
end
if not f then f = io.open(_HOME..'/core/locale.conf', 'rb') end
-if not f then error('"core/locale.conf" not found.') end
+assert(f, '"core/locale.conf" not found.')
for line in f:lines() do
if not line:find('^%s*%%') then
local id, str = line:match('^(.-)%s*=%s*(.+)$')