From 2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 2 Feb 2010 08:44:13 +0000 Subject: (Edit) do not crash when trying to rename a user to an already existing name --- NEWS | 1 + userdrake | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6b378d8..7155e5b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- do not crash when trying to rename a user to an already existing name - make libuser binding i18n aware - refactorization for readability (please test) - use libuser translations diff --git a/userdrake b/userdrake index fa1a101..b8af2b2 100755 --- a/userdrake +++ b/userdrake @@ -1154,7 +1154,11 @@ sub Edit() { Gtk2::Button->new($_->[0]), clicked => sub { if (!$retv) { if ($p <= 0) { - UserEdit_valid($userEnt, $model, $primgid); + eval { UserEdit_valid($userEnt, $model, $primgid) }; + if (my $err = $@) { + c::set_tagged_utf8($err); + RaiseError(N("An error occurred:") . "\n" . $err); + } } elsif ($p == 1) { GroupEdit_valid($groupEnt, $model, $groupname); } -- cgit v1.2.1