1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-23 03:45:14 +00:00
QB64-PE/tests/compile_tests/http/statuscode_invalid_handle.bas
Matthew Kilgore 445408d95b _StatusCode() should give the correct error on invalid handle type
Passing a handle of the invalid type (Ex. TCP) to _StatusCode should
give error 52, but it gies error 9.
2022-11-20 04:38:03 -05:00

19 lines
289 B
QBasic

$Unstable:Http
$Console:Only
ON ERROR GOTO errorhand
h& = _OpenHost("TCP/IP:50000")
' Error, invalid handle type
Print _StatusCode(h&)
' Errors, invalid handle numbers
Print _StatusCode(0)
Print _StatusCode(20)
System
errorhand:
PRINT "Error:"; ERR; ", Line:"; _ERRORLINE
RESUME NEXT