Test custom error classes