Migrated error dialog to OCaml