Skip to content

Commit

Permalink
SOME CATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
Kronos2308 committed Apr 14, 2024
1 parent f9b9011 commit 60a84fe
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 13 deletions.
Binary file modified out/RipJKAnimeNX.nro
Binary file not shown.
36 changes: 30 additions & 6 deletions source/JKanime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ int AnimeLoader(void* data){

steep++;//Load Directory
MkDIR();
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(2);
cout << "- Thread Chain Error Catched, Steep#" << steep <<endl;
//appletOverrideAutoSleepTimeAndDimmingTime(1800, 0, 500, 0);
Expand Down Expand Up @@ -564,7 +568,11 @@ int MkDIR(){
ofall=0;
write_DB(BD,rootdirectory+"DataBase.json");
}
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(3);
cout << "- Thread Chain Error Catched, Get Dir Error" <<endl;
return 0;
Expand Down Expand Up @@ -630,7 +638,11 @@ int downloadjkanimevideo(void* data) {//Download THREAD
}
}
if(cancelcurl==0) led_on(3); else led_on(0);
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(5);
cout << "- Thread Download Error Catched" <<endl;
cout << BD["arrays"]["downloads"] << endl;
Expand Down Expand Up @@ -707,7 +719,11 @@ int searchjk(void* data) {//Search Thread
statenow = programation_s;
returnnow = programation_s;
}
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(6);
cout << "- Thread Search Error Catched" <<endl;
cout << BD["arrays"]["search"] << endl;
Expand Down Expand Up @@ -739,7 +755,11 @@ int capit(void* data) {//Get chap thread
if (!AB[name]["Image"].is_null()) {
CheckImgNet(image,AB[name]["Image"]);
}
}catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(7);
cout << "- Error "+name <<endl;
}
Expand Down Expand Up @@ -1014,7 +1034,11 @@ void DataUpdate(string Link) {//Get info off chapter
//write to DB
AB[name]=AnimeINF;
cout << "Saved: " << name << endl;
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(9);
cout << "Anime Problemático: "<< name << endl;
cout << strm.str() << endl;
Expand Down
12 changes: 10 additions & 2 deletions source/Networking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ json REQUEST(string url,string POSTFIEL,bool HEADR,bool Verify){
try {
std::cout << std::setw(4) << data << std::endl;

}catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(10);
std::cout << " CODE: " << http_code << std::endl;
std::cout << " Redirects: " << redirects << std::endl;
Expand Down Expand Up @@ -475,7 +479,11 @@ bool CheckUpdates(bool force){
}
}
}
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(11);
std::cout << "# Update Error catch" << std::endl;
}
Expand Down
12 changes: 10 additions & 2 deletions source/SDLWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ void SDLB::SkinInit(string path,bool add) {
}
}
}
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
cout << "- Error Catched, SkinInit" <<endl;
}
}
Expand All @@ -280,7 +284,11 @@ void SDLB::selectskin(string val) {
if (them > allp) them=0;
GOD.setSkin(BD["Themes"]["files"][them]);
them++;
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
cout << "- Error Catched, loadSkin" <<endl;
}
}
Expand Down
6 changes: 5 additions & 1 deletion source/applet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ json DInfo(string ver){
std::cout << " " << key << ":>:" << value << endl;
config[key] = value;
}
}catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
cout << "error user conf" << endl;
}

Expand Down
6 changes: 5 additions & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,11 @@ int main(int argc, char **argv)
Farest.render((0), (0));
}
}
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(1);
cout << "- Error Catched Main" << endl;
GOD.PleaseWait("A ocurrido un error Critico la app se va a cerrar",true);
Expand Down
6 changes: 5 additions & 1 deletion source/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ bool write_DB(json base,std::string path,bool comp){
//commit
if (type == "save") user::commit();
if (type == "emmc") emmc::commit();
} catch(...) {
} catch(const char* errorMessage) {
std::cout << "Error: " << errorMessage << std::endl;
} catch(const std::exception& e) {
std::cout << "Error: " << e.what() << std::endl;
} catch(...) {
LOG::E(14);
std::cout << "Json: write Error... "<< path << std::endl;
return false;
Expand Down

0 comments on commit 60a84fe

Please sign in to comment.