added exceptions to serial driver library