#257531: Prevent errors on files containing non ascii characters without the encoding header
1.1 --- a/python.source/src/org/netbeans/modules/python/source/PythonParser.java Tue Nov 22 10:31:36 2016 +0100
1.2 +++ b/python.source/src/org/netbeans/modules/python/source/PythonParser.java Sun Dec 04 13:37:51 2016 +0100
1.3 @@ -374,6 +374,9 @@
1.4 } else {
1.5 return sanitize(context, sanitizing);
1.6 }
1.7 + } catch (IllegalArgumentException e) {
1.8 + Logger.getLogger(this.getClass().getName()).log(Level.WARNING, e.getMessage());
1.9 + return new PythonParserResult(null, context.snapshot);
1.10 } catch (NullPointerException e) {
1.11 String fileName = "";
1.12 if (file != null) {