Added reasons to assertions

This commit is contained in:
2023-07-23 10:15:37 -07:00
parent ef6b269141
commit 5b01eb904d
78 changed files with 357 additions and 289 deletions

View File

@@ -132,7 +132,7 @@ void VNSceneGen::test(
if(ifFirst == "" || ifPrevious == "") {
std::cout << "If event must have at least one event" << std::endl;
assertUnreachable();
assertUnreachable("VNSCeneGen::test: If event must have at least one event");
}
line(eventChain, eventName + "->ifTrue = " + ifFirst + ";", "");
@@ -163,7 +163,7 @@ void VNSceneGen::test(
default:
std::cout << "Unknown event type: " << event->type << std::endl;
assertUnreachable();
assertUnreachable("VNSceneGen::test: Unknown event type");
}
if(!toInclude.empty()) includes->push_back(toInclude);
@@ -192,7 +192,7 @@ void VNSceneGen::generate(
// Events
classInfo.includes.push_back("games/vn/events/VNDummyEvent.hpp");
line(&methodInit.body, "assertNotNull(vnManager);", "");
line(&methodInit.body, "assertNotNull(vnManager, \"VNSceneGenInit - VN Manager is null?\");", "");
line(&methodInit.body, "VNEvent *previous = vnManager->createEvent<VNDummyEvent>();", "");
line(&methodInit.body, "auto eventStart = previous;", "");