8 std::ifstream file(path);
20 std::string deviceId = crashDump.deviceId;
22 auto json = crashDump.serializeToJson();
24 for(
int i = 0;; i++) {
25 dai::Path destPath =
"crashDump_" +
to_string(i) +
"_" + deviceId +
"_" + commitHash +
".json";
28 std::ofstream ob(destPath);
29 ob << std::setw(4) << json << std::endl;
31 std::cout <<
"Crash dump found on your device!" << std::endl;
32 std::cout <<
"Saved to " << destPath.
string() << std::endl;
33 std::cout <<
"Please report to developers!" << std::endl;
37 std::cout <<
"There was no crash dump found on your device!" << std::endl;