How to bail out in Extension.init()
How to bail out in Extension.init()
If I find a serious problem when the server is starting up in init() override, is there a way I can force SFS to fail and exit? An example might be if my custom DB code can't connect to the DB, or some critical data is not found, etc.
Re: How to bail out in Extension.init()
Hi,
When you throw an exception on the init of your extension, only the extension is disabled, and the server finishes booting with no problems.
As a result, if you want so stop the server completely, then I think that the only solution is to shutdown the JVM, by calling Runtime.exit().
When you throw an exception on the init of your extension, only the extension is disabled, and the server finishes booting with no problems.
As a result, if you want so stop the server completely, then I think that the only solution is to shutdown the JVM, by calling Runtime.exit().
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: How to bail out in Extension.init()
OK that is fine, so if we simply throw a RuntimeException it will stop this extension loading?
Re: How to bail out in Extension.init()
If you throw a RuntimeException, if I'm not mistaken, it will prevent the extension from loading, but you won't also be able to communicate with it.
You can try it by simply throwing an exception on the init of your extension.
You can try it by simply throwing an exception on the init of your extension.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.