new CommandDrivenErrorCallback( view,
makeNoSuchFileExceptionCommand() ) ).loadContent( path );
}
private Map<Class<? extends Throwable>, Command> makeNoSuchFileExceptionCommand() {
final CommandBuilder builder = new CommandBuilder();
builder.add( NoSuchFileException.class,
new Command() {
@Override
public void execute() {
view.handleNoSuchFileException();
view.hideBusyIndicator();
}
} );
return builder.build();
}