From 8486606456577d456d1939bb18cea7fc0f9c7a74 Mon Sep 17 00:00:00 2001 From: Andrew Krasichkov Date: Fri, 12 May 2017 19:40:14 +0300 Subject: [PATCH] Better error message for "if" directive --- gixy/directives/block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gixy/directives/block.py b/gixy/directives/block.py index e55b725..0dd2651 100644 --- a/gixy/directives/block.py +++ b/gixy/directives/block.py @@ -141,7 +141,7 @@ class IfBlock(Block): # if ($request_method = POST) self.variable, self.operand, self.value = args else: - raise Exception('Unknown "if" definition') + raise Exception('Unknown "if" definition, args: {}'.format(repr(args))) def __str__(self): return '{} ({}) {{'.format(self.name, ' '.join(self.args))