mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
FIXED IDEA-136208 Import non-eclipse formatter xml (more explanatory message)
This commit is contained in:
+13
-2
@@ -53,7 +53,12 @@ public class EclipseXmlProfileReader extends DefaultHandler implements EclipseXm
|
||||
parser.parse(input, this);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new SchemeImportException(e);
|
||||
if (e.getCause() instanceof NonEclipseXmlFileException) {
|
||||
throw new SchemeImportException("The input file is not a valid Eclipse XML profile.");
|
||||
}
|
||||
else {
|
||||
throw new SchemeImportException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +84,13 @@ public class EclipseXmlProfileReader extends DefaultHandler implements EclipseXm
|
||||
// Ignore
|
||||
}
|
||||
else {
|
||||
throw new SAXException("Unknown XML element: " + qName);
|
||||
throw new SAXException(new NonEclipseXmlFileException("Unknown XML element: " + qName));
|
||||
}
|
||||
}
|
||||
|
||||
private static class NonEclipseXmlFileException extends Exception {
|
||||
public NonEclipseXmlFileException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user