Code example for JsonSyntaxException

Methods: getMessage

0
		WidgetDefinition definition = null;
 
		try { 
			definition = this.gson.fromJson(source, WidgetDefinition.class);
		} catch (final JsonSyntaxException e) {
			L.error(e.getMessage());
			return null; 
		} 
 
		/* initialize controls */ 
		L.debug("creating component: '{}'", componentName);
 
		return new Component(componentName, definition, parent, context, customCreators, types);
	} 
 
	//~ Inner Classes -------------------------------------------------------------------------------------------------- 
 
	private static final class ImmutableListDeserializer implements JsonDeserializer<ImmutableList<?>> {
		@Override 
		public ImmutableList<?> deserialize(final JsonElement json, final Type type,