So I'm making an option in my plugin to automatically detect and send any stack traces produced by itself to me. I have no idea how to detect and get a stack trace the plugin produces that is NOT in a try and catch, any ideas?
*Hate incoming* I don't know a way to do this so far. I would try putting everything into a try-catch :/ Code (Text): @Override public void onEnable() { try { //DO EVERYTHING HERE } catch(Exception e) { //SEND IT HERE } (BTW: That was my 100th post)
NOPE... BRILLIANT! But does this override ALL plugin unhandled exceptions? I don't want to interfere with stack traces that aren't of my own plugin.
I didn't think of that. I haven't personally tried it, but I would guess that it does; however, you could check if any of the classes causing the exception to be thrown are yours.
Yes I guess I could check for my plugin's name in the stack trace... I think i can do that... I'll try.
Are you sure? :/ I double dare you to make a pull request placing every single command in this plugin into a try-catches... https://github.com/TeamTrillium/Trillium Yeah, NOT happening. I want this exception handling feature because it seems very useful and cool.