The exception
The exceptive sentence consists usually of three elements: the given information, مستثنى منه + the particle أداة استثناء + the excepted object مستثنى.
Ex. حضر الطلاب إلا خالدا (The students came, except Khaled)
The particles of exception are: إلا، غير، سوى، عدا، حاشا (meaning: except)
The declension of the excepted object, with the particle إلا :
1. If the exceptive sentence is affirmative and comlete (the 3 elements are present), the excepted object takes the accusative case, النصب. Ex. قام القوم إلا عمرًا. (They stood up all except Oumar)
2. If the exceptive sentence is negative and comlete, the excepted object may take the nominative or accusative case, الرفع أو النصب.
3. If the exceptive sentence is incomplete (the given information, مستثنى منه, is omitted; the excepted object takes the case which corresponds to its position in the sentence (it can be a subject or a complement, for example.)