Forge Developers | Slack Search | Trello Board Changelog
|
Forge Networking Remastered has been released!!! This is now listed in your Profile!
Go Back

Capturing Exceptions

At any point in a program something could go wrong with the network, or invalid values or data structures could be used which will cause an exception. In Forge we use our event driven structure in order to capture these exceptions and enable you as a developer to execute logic based on these specific exceptions. The following shows how you can filter these various exceptions.

Here is some sample code on how to effectively use the event to check to see if a host is currently already running on the specified port. If so, then it will attempt to connect to the next port (port++). This will happen a maximum of ten times before stopping.

Title

Body

Title

Body


Input:

Title

Body


Input: