virtual-world-framework / vwf

Virtual World Framework
https://virtual.wf
Other
142 stars 53 forks source link

Detect and log load errors #404

Closed davideaster closed 9 years ago

davideaster commented 9 years ago

@kadst43 @eric79 this will detect load errors, log a message to the console, and abort the fragment of the operation that failed.

The error needs to be handled better at the top. Maybe we shouldn't try to resume the operation yet, but let it still hang but with a message on the console now.

eric79 commented 9 years ago

I leave up to you the decision of whether to put off resuming the operation. But I give this a :+1: to merge.

Thanks for the quick turn-around time.

davideaster commented 9 years ago

The errors are passed up only to the action that detects them. For example, if kernel.createChild encounters a timeout or other error loading a component, script, or external resource, createChild receives the error, but it doesn't pass it up to its caller.

Propagating errors to the originating caller would require supporting error callbacks on any actions that could cause a load error, which is most of them since most actions can call scripts that create nodes. This needs to happen, but it requires factoring part of the driver interaction into the adapter stage so that the async management doesn't get out of hand.

This is still an improvement though since the error is logged, and the load doesn't just quietly hang.

davideaster commented 9 years ago

Rebased onto current development.