/** * This Implementation simply throws a BridgeException. * * @param e The <image> element that can't be loaded. * @param url The resolved url that can't be loaded. * @param message As best as can be determined the reason it can't be * loaded (not available, corrupt, unknown format,...). */ public SVGDocument getBrokenLinkDocument(Element e, String url, String message) { throw new BridgeException(ctx, e, ErrorConstants.ERR_URI_IMAGE_BROKEN, new Object[] {url, message }); }
/** * Compares the input exception with the expected exception * If they match, then the test passes. Otherwise, the test fails */ protected TestReport handleException(Exception e) { if (!isMatch(e.getClass(), expectedExceptionClass)) { TestReport report = reportError(ERROR_UNEXPECTED_EXCEPTION); report.addDescriptionEntry(ENTRY_KEY_UNEXPECTED_EXCEPTION, e.getClass().getName()); report.addDescriptionEntry(ENTRY_KEY_EXPECTED_EXCEPTION, expectedExceptionClass); return report; } else { if (!ERROR_CODE_NO_CHECK.equals(expectedErrorCode) && e instanceof BridgeException) { if ( !expectedErrorCode.equals(((BridgeException)e).getCode()) ) { TestReport report = reportError(ERROR_UNEXPECTED_ERROR_CODE); report.addDescriptionEntry(ENTRY_KEY_UNEXPECTED_ERROR_CODE, ((BridgeException)e).getCode()); report.addDescriptionEntry(ENTRY_KEY_EXPECTED_ERROR_CODE, expectedErrorCode); return report; } } return reportSuccess(); } }
GraphicsNode errNode = ex.getGraphicsNode(); if (errNode != null) { parentNode.getChildren().add(errNode); gnBridge.buildGraphicsNode(ctx, e, errNode); ex.setGraphicsNode(null);
} catch (BridgeException e) { exception = e; ev = new GVTTreeBuilderEvent(this, e.getGraphicsNode()); fireEvent(failedDispatcher, ev); } catch (Exception e) {
scriptEnvironment.dispatchSVGLoadEvent(); } catch (BridgeException e){ e.printStackTrace(); report.setErrorCode(ERROR_WHILE_PROCESSING_SVG_DOCUMENT); report.addDescriptionEntry(ENTRY_KEY_ERROR_DESCRIPTION, e.getMessage()); report.setPassed(false); return report;
} catch (BridgeException ex) { ex.setGraphicsNode(rootNode);
ex.printStackTrace(); throw new TranscoderException(ex);
if (ERR_URI_UNSECURE.equals(e.getCode())) { ctx.getUserAgent().displayError(e);
GraphicsNode errNode = ex.getGraphicsNode(); if (errNode != null) { parentNode.getChildren().add(errNode); gnBridge.buildGraphicsNode(ctx, e, errNode); ex.setGraphicsNode(null);
} catch (BridgeException e) { exception = e; ev = new GVTTreeBuilderEvent(this, e.getGraphicsNode()); fireEvent(failedDispatcher, ev); } catch (Exception e) {
} catch (BridgeException ex) { ex.setGraphicsNode(rootNode);
/** * This Implementation simply throws a BridgeException. * * @param e The <image> element that can't be loaded. * @param url The resolved url that can't be loaded. * @param message As best as can be determined the reason it can't be * loaded (not available, corrupt, unknown format,...). */ public SVGDocument getBrokenLinkDocument(Element e, String url, String message) { throw new BridgeException(ctx, e, ErrorConstants.ERR_URI_IMAGE_BROKEN, new Object[] {url, message }); }
if (ERR_URI_UNSECURE.equals(e.getCode())) { ctx.getUserAgent().displayError(e);
GraphicsNode errNode = ex.getGraphicsNode(); if (errNode != null) { parentNode.getChildren().add(errNode); gnBridge.buildGraphicsNode(ctx, e, errNode); ex.setGraphicsNode(null);
} catch (BridgeException e) { exception = e; ev = new GVTTreeBuilderEvent(this, e.getGraphicsNode()); fireEvent(failedDispatcher, ev); } catch (Exception e) {
} catch (BridgeException ex) { ex.setGraphicsNode(rootNode);
/** * This Implementation simply throws a BridgeException. * * @param e The <image> element that can't be loaded. * @param url The resolved url that can't be loaded. * @param message As best as can be determined the reason it can't be * loaded (not available, corrupt, unknown format,...). */ public SVGDocument getBrokenLinkDocument(Element e, String url, String message) { throw new BridgeException(ctx, e, ErrorConstants.ERR_URI_IMAGE_BROKEN, new Object[] {url, message }); }
if (ERR_URI_UNSECURE.equals(e.getCode())) { ctx.getUserAgent().displayError(e);
/** * Parses the specified coordinate system defined by the specified * marker element. * * @param e the element that defines the coordinate system * @param attr the attribute which contains the coordinate system * @param coordinateSystem the coordinate system to parse * @param ctx the BridgeContext to use for error information * @return STROKE_WIDTH | USER_SPACE_ON_USE */ public static short parseMarkerCoordinateSystem(Element e, String attr, String coordinateSystem, BridgeContext ctx) { if (SVG_USER_SPACE_ON_USE_VALUE.equals(coordinateSystem)) { return USER_SPACE_ON_USE; } else if (SVG_STROKE_WIDTH_VALUE.equals(coordinateSystem)) { return STROKE_WIDTH; } else { throw new BridgeException(ctx, e, ERR_ATTRIBUTE_VALUE_MALFORMED, new Object[] {attr, coordinateSystem}); } }
refElement = ctx.getReferencedElement(altGlyphElement, uri); } catch (BridgeException e) { if (ERR_URI_UNSECURE.equals(e.getCode())) { ctx.getUserAgent().displayError(e);