Add exception handling when the materializer failed during the runtime.