add multi type exception catching to manual (#18258) (#18323)

This commit is contained in:
xioren 2021-06-21 18:53:35 -07:00 • committed by GitHub
commit 16461a8810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4462,10 +4462,8 @@ Example:
echo "sum: " & $(parseInt(a) + parseInt(b)) echo "sum: " & $(parseInt(a) + parseInt(b))
except OverflowDefect: except OverflowDefect:
echo "overflow!" echo "overflow!"
except ValueError: except ValueError, IOError:
echo "could not convert string to integer" echo "catch multiple exceptions!"
except IOError:
echo "IO error!"
except: except:
echo "Unknown exception!" echo "Unknown exception!"
finally: finally: