openapi: actually catch the error when esprima fails at parsing the file
39f8a138d7ba added a try/except around esprima to catch any hard error
from the parsing, but the returned value was not checked.
We now have the file models/exportExcel.js which gives us an unexpected
symbol on line 3 (not sure why it is not happy), but that fails the
generation of the doc entirely.
Fixes #3884
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>