Automatic reporting
Once Nitea.init has run, you get these without writing any code:
| What | When it's sent |
|---|---|
| Uncaught exceptions your mod caused | Right away. On the main, Render thread and Server thread threads they're reported as fatal crashes, since they take the game down. |
| Minecraft crash reports your mod caused | On the next launch, because the game is gone when it crashes. |
Crash reports written before the player allowed reporting are never sent.
Which mod gets the error
Nitea only reports errors your code caused, never another mod's. It starts from the root cause of the exception and walks the stack trace, skipping JDK, Minecraft and loader frames. The first frame left decides:
It belongs to a mod using Nitea
Only that mod reports it.
It belongs to another mod or library
Nobody reports it.
It's Mixin code injected into the game
Frames like handler$abc000$examplemod$onTick are attributed to the mod that injected them.
So when your mod calls mod B and B throws, B gets the issue, not you. When the game throws because your mod passed it bad data, you get it.
Your code is the package of the class you pass to owner(...), plus its subpackages. If your mod spans several root packages, list them:
NiteaOptions.builder("examplemod")
.owner(ExampleMod.class)
.inAppPackages("com.example.examplemod", "com.example.sharedlib")
// ...
.build();
Turning it off
NiteaOptions.builder("examplemod")
.captureUncaught(false) // no uncaught exceptions
.scanCrashReports(false) // no crash reports
// ...
.build();