From 35c741f3fe156da3572d51d043709a4f73643c39 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Wed, 30 Jan 2013 09:14:11 +0200 Subject: improved error handling do not print stack trace in case of user errors, fixes #1453 immediate fallback after failed activation, even with --force, before main process exit, fixes #1584 --- awall/iptables.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'awall/iptables.lua') diff --git a/awall/iptables.lua b/awall/iptables.lua index 02536e8..32b59b2 100644 --- a/awall/iptables.lua +++ b/awall/iptables.lua @@ -1,6 +1,6 @@ --[[ Iptables file dumper for Alpine Wall -Copyright (C) 2012 Kaarle Ritvanen +Copyright (C) 2012-2013 Kaarle Ritvanen Licensed under the terms of GPL2 ]]-- @@ -10,6 +10,7 @@ module(..., package.seeall) require 'lpc' require 'awall.object' +require 'awall.uerror' require 'awall.util' local class = awall.object.class @@ -70,7 +71,7 @@ function BaseIPTables:restore(test) end end - if disabled then error('Firewall not enabled in kernel') end + if disabled then awall.uerror.raise('Firewall not enabled in kernel') end end function BaseIPTables:activate() -- cgit v1.2.3