Returns an error string describing the result code of this lookup. @return A string, which may either directly correspond the result code or be more specific. @throws IllegalStateException The lookup has not completed.
()
| 640 | * @throws IllegalStateException The lookup has not completed. |
| 641 | */ |
| 642 | public String |
| 643 | getErrorString() { |
| 644 | checkDone(); |
| 645 | if (error != null) |
| 646 | return error; |
| 647 | switch (result) { |
| 648 | case SUCCESSFUL: return "successful"; |
| 649 | case UNRECOVERABLE: return "unrecoverable error"; |
| 650 | case TRY_AGAIN: return "try again"; |
| 651 | case HOST_NOT_FOUND: return "host not found"; |
| 652 | case TYPE_NOT_FOUND: return "type not found"; |
| 653 | } |
| 654 | throw new IllegalStateException("unknown result"); |
| 655 | } |
| 656 | |
| 657 | } |