Added explicit exception type for adaptation failures (fixes #27)