3 ms·
What the exceptional case is depends on the what the pre- and post-conditions of the function are. If a function assumes that the user is logged in then the use
by Lvl999Noob 3y ago
What the exceptional case is depends on the what the pre- and post-conditions of the function are. If a function assumes that the user is logged in then the user not being logged in is indeed exception. Not to say that it is good design though. That function is quite fragile like this. If it must assume that a user is logged in, then it could easily require a user to be given as an argument which will remove the whole possibility.