Rearranged try-catch blocks in serialWrite function. Added specific exceptions that Serial::SerialImpl::write function may throw.