[REL] Better Error Handling


#1


What is it?
This mod attempts to improve upon the existing error handling in GDT which is a simple popup that barely gives any actual information.
The current error handling is both not user friendly as it is developer friendly because users have no idea what’s happening (vague popup) and developers can’t help the users because of the little information the popup provides.
This mod does not affect your gameplay, in any way, until the game hits an (uncaught) error of which it can’t recover, then this mod will come in to play.
It will collect data and dump it into a JSON object you can browse trough from the error page.
You can also copy this object and for example paste it on the forums or email it to GHG support.

Why?
Because I’m tired of the ‘I got an uncaught error’ posts that provide zero to nothing information on what the actual errror is, so I whipped up this little mod in a few hours.

This approach is:

  • More userfriendly
  • More developer friendly

Installation

  1. Create a folder called ‘jariz-error’ into your /mods/ directory
    (typically this would be at C:\Program Files (x86)\Steam\steamapps\common\Game Dev Tycoon\mods)
  2. Open the zip file you downloaded below and open the jariz-error-master folder.
  3. Open the jariz-error folder in your mods directory.
  4. Select all files in the jariz-error-master folder, and drag them into the jariz-error folder.

Credits
Bootstrap
PRETTYJSON

Source code
As always, on github:

Remarks
I do admit that there is a problem with this approach: The game scripts keep running and because this mod removes the entire DOM it might cause further errors, however, the mod blocks any further errors after showing the page, so you probably won’t even notice, however, your console will probably get spammed with exceptions.


[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[QUES] Error! Help needed!
[TUT] Mod Troubleshooting Guide for Players
[REL] Super Consoles Mod [0.9.8.2]
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[BETA] SaveBackup [1.0.3]
Help plz have an error
Official Mod List
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
A Simple Mod Suggestion: Choosing Topics
Mod compatibility?
[bug] Error: Property not set on object: pointsCostEnabled
Multiple mod bug
[NEED HELP] UME Custom Code
Topic/Genre matches don't seem to be working in my MOD
!Error Alert! Requesting Assistance
Help plz have an error
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[WIP] GDTMP - Multiplayer Mod [Client 0.5.11, Server 1.5.5.0] (Now in 10 languages!)
[Rel] The Super Modpack for GDT
#2

Sooo I need to download those Bootstrap and Prettyjson?

Looks nice, and very useful/


#3

No, they’re already included, I just added them as credit.
It’s simple drag’n’drop, just like any other mod.


#4

Uhh, when ive installed your mod there is error that Error,js is missing or invaild. Well, I see Error.js in mods directory, so its not missing.


#5

You should place the mod files in a folder called ‘jariz-error’.
For example the modAPI.js file should have the following path from the game dev tycoon folder:
\mods\jariz-error\modAPI.js
I will make this more clear in the main thread.


#6

Oh, it was in folder jariz-error**-master**. Thank for the mod! Its working, and its brilliant!


#7

It helped me already :blush:


#8

Very handy Jari! :slight_smile:


#9

Hey @Jari

Would you like me to add this to the official mod list?


#10

Yea, absolutely, thanks!


#11

Great mod, can easily help modders make mods in the future.


#12

I made a new folder called jariz-error, put all the contents from the .zip into it, enabled it ingame, but I just get the same error dialog box as I would normally?


#13

Erm, no idea. Could you send me a screenshot of your console?
To find out how to get to the console check out my tutorial:
http://forum.greenheartgames.com/t/tut-debug-game-dev-tycoon/8847


#14

This is all I’m getting in the console. Seeing as nothing is related to your mod, I guess it’s on my end. I’ll try and re-install it. (If you’re wondering what PSC is, it’s my mod. Still trying to fix it) http://gyazo.com/ed003c8b1836f3cb6c51c46ce74003a8


#15

It’s probably because your mod is crashing before my mod’s loaded.
My mod only catches errors after it’s initialized.


#16

doesn’t work :
Could not load mod one of the scripts mods/jariz-error/js/resources.js,mods/jariz-error/js/Error.js is missing or invalid!


#17

Read other posts! I had same problem.


#18

Bonjour j’ai ce problème la depuis que j’ai acheter le lab R&D


#19

Why do You post it there?


#20

@mamouthe This is not an error with this mod