You need an article here.
If there's only one exception, it should be, "The exception is when...", and if there are multiple exceptions, say, "An exception is when..."
("I" don't know why, "it" just happens sometimes.)
Or for instance, if you're viewing a house on the market: "Kitchen is to the left, sitting room to the right; office is upstairs." It's certainly a casual register, but it's no less grammatical than including the articles explicitly.
In the ancestor comment's "Exception is when ...", the article is implied but elided, in the same way. (I inferred "the".) You could argue whether it's effective to drop the article there, because it's ambiguous in the way you noted, but it's still grammatically valid. (Chomsky's "colorless green ideas" is the usual example where semantic sense diverges from grammatical validity.)
It’s possible that my sensitivity to this kind of error (or causal register, if you prefer) is due to experience learning other languages that don’t have articles like those in English. I doubt it, though. Many others probably also find sentences stripped of articles as jarring, and that’s useful for anyone learning English to know.
As I learner, I generally want it to be understood by speakers of the language as easily and with as little friction as possible.
The thing is, English really wants all singular nouns tagged with a determiner - that can be an article, possessive such as "my, your," etc., demonstrative such as "this, that,", or other determiners such as "any, all, one, some," etc.
Exception is when the noun is referring to its concept in the abstract (think type of X instead of instance of X).
So, "the X" means the speaker has a particular X in mind and is expecting you to know which X he/she is talking about it - either from previous conversation, assumed shared experience/culture, or rarely the speaker intentionally wants you to feel like you're missing out on something. "A/an X" means the listener isn't expected to have been tracking X.
IMHO more difficult than articles is explaining the perfect aspect of verbs - e.g. difference between "I X'ed" and "I have X'ed".
English has something like particles too - often called phrasal verbs. E.g. knock and knock out mean two completely different things.