Adding improved exception handling for background isolates.