rustmap | A very simple Nmap-like program that can scan | Security Testing library
kandi X-RAY | rustmap Summary
kandi X-RAY | rustmap Summary
Rustmap is a very simple "Nmap-like" program that can scan for hosts and open TCP ports. It is mostly written for educational purposes (I wanted to learn Rust, and learn a bit more about how Nmap works) so it's quite slow and doesn't have many features.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rustmap
rustmap Key Features
rustmap Examples and Code Snippets
Community Discussions
Trending Discussions on rustmap
QUESTION
I need to check specific status codes from a RestResponse
however the RestRequest.Execute
seems to generate a EHTTPProtocolException
when the status codes are not 200.
I did take a look at the documentation and it states that The request execution does not raise HTTP protocol exceptions. To verify the response status, check the TCustomRESTResponse.StatusCode property.
I'm having some trouble understanding why a EHTTPProtocolException
gets raised. How can I ignore this or suppress it? I did check if it's just the debugger but the code stops at execute even in a Release build and when running standalone.
My code is as follows:
...ANSWER
Answered 2021-Mar-30 at 19:49IF the exception is escaping TRestRequest.Execute()
into your code, then just catch it with a try..except
. EHTTPProtocolException
has an ErrorCode
property you can look at, if needed.
A try..except
does not prevent an exception from being raised at all. The debugger will still show the exception being raised, unless you configure the debugger to ignore it. But your code will be able to catch the exception and process it as needed. If the debugger breaks on the exception, simply press the "Run" button on the IDE, or F9 on the keyboard, to continue execution, and the exception will be passed to the nearest matching exception handler in your code.
For example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rustmap
cargo install rustmap
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page