diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport
index c90d47373..2efa1770f 100755
--- a/htmlreport/cppcheck-htmlreport
+++ b/htmlreport/cppcheck-htmlreport
@@ -384,6 +384,8 @@ if __name__ == '__main__':
if not os.path.exists(options.file):
parser.error('cppcheck xml file: %s not found.' % options.file)
input_file = io.open(options.file, 'r')
+ else:
+ parser.error('No cppcheck xml file specified. (--file=)')
# Parse the xml file and produce a simple list of errors.
print('Parsing xml report.')