diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-02-15 09:14:03 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-02-15 09:14:03 +0000 |
commit | 6c59a196772b6d6c6b2b969b85c1a2551ef017d8 (patch) | |
tree | f5fa4ee8694a290b0e46245ba2d376e4723012c0 /installer/web.php | |
parent | 0e3df4e5d2d3d07199f5465fd6d21b45c96f844b (diff) |
Get rid of InstallException and handle exceptions from create_admin()
properly.
Diffstat (limited to 'installer/web.php')
-rw-r--r-- | installer/web.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/installer/web.php b/installer/web.php index 89b0021d..cfae7a33 100644 --- a/installer/web.php +++ b/installer/web.php @@ -52,8 +52,12 @@ if (installer::already_installed()) { } else if (!installer::create_database_config($config)) { $content = oops("Couldn't create var/database.php"); } else { - list ($user, $password) = installer::create_admin($config); - $content = render("success.html.php", array("user" => $user, "password" => $password)); + try { + list ($user, $password) = installer::create_admin($config); + $content = render("success.html.php", array("user" => $user, "password" => $password)); + } catch (Exception $e) { + $content = oops($e->getMessage()); + } } break; } |