I don't own PowerBASIC so I can't help with the conversion but I noticed you asked what "throw" meant.

If an error occurs in that section of code at the end, such as a file cannot be found then...