B4J Question Nested try-catch

marcick

Well-Known Member
Licensed User
Longtime User
Inside a catch section, is it possibile to insert a nested try-catch?
 

drgottjr

Expert
Licensed User
Longtime User
yes. why not just try and see what happens?

B4X:
    Try
        File.ReadString(File.DirApp, "doesnotexist.txt")
    Catch
        Log(LastException)
        Try
            File.ReadString(File.DirApp, "doesnotexist2.txt")
        Catch
            Log(LastException)
        End Try
    End Try
 
Last edited:
Upvote 1
Top