public List <ActivityFromTeacher> Get_Teacher_SuperVisorId(int docentenNumber) { try { List <ActivityFromTeacher> activiteitDocenten = activity_db.Db_Get_Teacher_SuperVisorId(docentenNumber); return(activiteitDocenten); } catch (Exception) { // something went wrong connecting to the database, so we will add a fake student to the list to make sure the rest of the application continues working! List <ActivityFromTeacher> activiteiten = new List <ActivityFromTeacher>(); ActivityFromTeacher a = new ActivityFromTeacher(); a.LecturerId = 1; a.Description = "Bla"; activiteiten.Add(a); return(activiteiten); //throw new Exception("Someren couldn't connect to the database"); } }