This commit is contained in:
parent
f30bebf09a
commit
5db7a74047
1 changed files with 7 additions and 2 deletions
|
|
@ -38,8 +38,13 @@ namespace Crafter {
|
|||
std::cout << "bruh3" << std::endl;
|
||||
std::ifstream f(this->path);
|
||||
std::cout << this->path << std::endl;
|
||||
nlohmann::json data = nlohmann::json::parse(f);
|
||||
std::cout << "bruh4" << std::endl;
|
||||
nlohmann::json data;
|
||||
try {
|
||||
data = nlohmann::json::parse(f);
|
||||
} catch(std::exception& e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
std::cout << "bruh4" << std::endl;
|
||||
name = data["name"].get<std::string>();
|
||||
|
||||
this->path.remove_filename();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue