Error Handling on Embedded???

I see we can emben web content using
otsRunStatus = new Embedded( label, url);
otsRunStatus.setType(Embedded.TYPE_BROWSER);

if the url is valid i do see the output.

however when the url is not valid, or there is no net connection, how do i handle such error

i want to display some error message in case of some error.

how is this possible?