improve type safety, add Jdp specific exceptions