Decodes an exception from HBase 0.95 and up. @param e the exception protobuf obtained from the RPC response header containing the exception.
(final HBaseRpc request,
final RPCPB.ExceptionResponse e)
| 1804 | * containing the exception. |
| 1805 | */ |
| 1806 | private |
| 1807 | static HBaseException decodeException(final HBaseRpc request, |
| 1808 | final RPCPB.ExceptionResponse e) { |
| 1809 | final String type; |
| 1810 | if (e.hasExceptionClassName()) { |
| 1811 | type = e.getExceptionClassName(); |
| 1812 | } else { |
| 1813 | type = "(missing exception type)"; // Shouldn't happen. |
| 1814 | } |
| 1815 | return makeException(request, type, e.getStackTrace()); |
| 1816 | } |
| 1817 | |
| 1818 | /** |
| 1819 | * Decodes an exception from HBase 0.95 and up {@link HBasePB.NameBytesPair}. |