MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / main

Function main

source/utility/dump_versioned_json.cpp:6–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace Star;
5
6int main(int argc, char** argv) {
7 try {
8 if (argc != 3) {
9 coutf("Usage, {} <versioned_json_binary> <versioned_json_json>\n", argv[0]);
10 return -1;
11 }
12
13 auto versionedJson = VersionedJson::readFile(argv[1]);
14 File::writeFile(versionedJson.toJson().printJson(2), argv[2]);
15 return 0;
16 } catch (std::exception const& e) {
17 coutf("Error! Caught exception {}\n", outputException(e, true));
18 return 1;
19 }
20}

Callers

nothing calls this directly

Calls 4

coutfFunction · 0.85
outputExceptionFunction · 0.50
printJsonMethod · 0.45
toJsonMethod · 0.45

Tested by

no test coverage detected