|
|
|
@ -53,7 +53,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
{
|
|
|
|
|
if (logo.GetName() == name) { return logo.GetLogoLink(); }
|
|
|
|
|
}
|
|
|
|
|
throw new NullReferenceException("No logo link found.");
|
|
|
|
|
throw new LogoNotFoundException("No logo link found.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -68,7 +68,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
return user;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
throw new NullReferenceException("No user found with this username.");
|
|
|
|
|
throw new UserAlreadyUsedException("No user found with this username.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -103,11 +103,11 @@ namespace Biblioteque_de_Class
|
|
|
|
|
{
|
|
|
|
|
if (existingUser.GetUsername() == user.GetUsername())
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("Username already used.");
|
|
|
|
|
throw new UserAlreadyUsedException("Username already used.");
|
|
|
|
|
}
|
|
|
|
|
else if (existingUser.GetEmail() == user.GetEmail())
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("Email already used.");
|
|
|
|
|
throw new UserAlreadyUsedException("Email already used.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
UserList.Add(user);
|
|
|
|
@ -124,7 +124,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw new NullReferenceException("User not found.");
|
|
|
|
|
throw new UserNotFoundException("User not found.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -137,7 +137,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
{
|
|
|
|
|
if (existingTheme.GetName() == theme.GetName())
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("Theme already used.");
|
|
|
|
|
throw new ThemeAlreadyUsedException("Theme already used.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ThemeList.Add(theme);
|
|
|
|
@ -154,7 +154,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw new NullReferenceException("Theme not found.");
|
|
|
|
|
throw new ThemeNotFoundException("Theme not found.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -170,7 +170,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
return theme;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
throw new NullReferenceException("No theme found with this name.");
|
|
|
|
|
throw new ThemeNotFoundException("No theme found with this name.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -186,7 +186,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
throw new NullReferenceException("Theme not found.");
|
|
|
|
|
throw new ThemeNotFoundException("Theme not found.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -205,7 +205,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
throw new NullReferenceException("Theme not found.");
|
|
|
|
|
throw new ThemeNotFoundException("Theme not found.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|