in c++,
"Detailed Description Thrown by the library, or by you, to report domain errors (domain in the mathmatical sense). "
From: http://www.aoc.nrao.edu/~tjuerges/ALMA/STL/html/classstd_1_1domain__error.html
according to this, it should be used if you are given input that does not comply with the constraints you put on your interface. Like say, a function that is supposed to receive a positive value and is given a negative one.