|
|
|
@ -84,7 +84,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("Image not found");
|
|
|
|
|
throw new NullReferenceException("Image not found");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -100,7 +100,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
throw new Exception("User is not an editor");
|
|
|
|
|
throw new NullReferenceException("User is not an editor");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
public void AddCollaborator(User owner, User user)
|
|
|
|
|
{
|
|
|
|
|
if (VerifyOwner(owner)) { Collaborators.Add(user); }
|
|
|
|
|
else { throw new Exception("User is not the owner"); }
|
|
|
|
|
else { throw new NullReferenceException("User is not the owner"); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -119,7 +119,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
public void RemoveCollaborator(User owner, User user)
|
|
|
|
|
{
|
|
|
|
|
if (VerifyOwner(owner)) { Collaborators.Remove(user); }
|
|
|
|
|
else { throw new Exception("User is not the owner"); }
|
|
|
|
|
else { throw new NullReferenceException("User is not the owner"); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -128,7 +128,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
public void AddEditor(User owner, User user)
|
|
|
|
|
{
|
|
|
|
|
if (VerifyOwner(owner)) { Editors.Add(user); }
|
|
|
|
|
else { throw new Exception("User is not the owner"); }
|
|
|
|
|
else { throw new NullReferenceException("User is not the owner"); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -137,7 +137,7 @@ namespace Biblioteque_de_Class
|
|
|
|
|
public void RemoveEditor(User owner, User user)
|
|
|
|
|
{
|
|
|
|
|
if (VerifyOwner(owner)) { Editors.Remove(user); }
|
|
|
|
|
else { throw new Exception("User is not the owner"); }
|
|
|
|
|
else { throw new NullReferenceException("User is not the owner"); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|