Merge branch 'general-devel' into player-data
This commit is contained in:
commit
2a5e19da39
3 changed files with 5 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ namespace TShockAPI.DB
|
|||
catch (Exception ex)
|
||||
{
|
||||
// Detect duplicate user using a regexp as Sqlite doesn't have well structured exceptions
|
||||
if (Regex.IsMatch(ex.Message, "Username.*not unique"))
|
||||
if (Regex.IsMatch(ex.Message, "Username.*not unique|UNIQUE constraint failed: Users\\.Username"))
|
||||
throw new UserAccountExistsException(account.Name);
|
||||
throw new UserAccountManagerException("AddUser SQL returned an error (" + ex.Message + ")", ex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue