| 617 | } |
| 618 | |
| 619 | int printStatusFromJSON(std::string const& jsonFileName) { |
| 620 | try { |
| 621 | json_spirit::mValue value; |
| 622 | json_spirit::read_string(readFileBytes(jsonFileName, 10000000), value); |
| 623 | |
| 624 | printStatus(value.get_obj(), StatusClient::DETAILED, false, true); |
| 625 | |
| 626 | return 0; |
| 627 | } catch (std::exception& e) { |
| 628 | printf("Exception printing status: %s\n", e.what()); |
| 629 | return 1; |
| 630 | } catch (Error& e) { |
| 631 | printf("Error printing status: %d %s\n", e.code(), e.what()); |
| 632 | return 2; |
| 633 | } catch (...) { |
| 634 | printf("Unknown exception printing status.\n"); |
| 635 | return 3; |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | ACTOR Future<Void> timeWarning(double when, const char* msg) { |
| 640 | wait(delay(when)); |
no test coverage detected