|Re: Skipping resolution error when loading [message #1738576 is a reply to message #1738565]
||Thu, 21 July 2016 05:09
| Ed Merks
Registered: July 2009
It only seems as if loading stops at the first encountered error,
because an exception is thrown, but the resource loads as much of the
model as is possible, recording exceptions for any problem (in
Resource.getErrors()), and then at the end, it rethrows the first
recorded exception. That's why a generated editor uses this pattern to
get the resource the first time:
Exception exception = null;
Resource resource = null;
// Load the resource through the editing domain.
catch (Exception e)
exception = e;
On 20.07.2016 23:31, Raphael B wrote:
> When loading a file, from what I observed the loader stops at the
> first encountered error (e.g. IllegalValueException).
> Is there a way to ignore errors like unresolved IDs?
> I tried various XMLResource options, but none seemed to work.
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.01448 seconds