mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Examples: Add more error reporting
This commit is contained in:
committed by
Kyle Schwarz
parent
c466d75dae
commit
5620c98eda
@@ -9,8 +9,10 @@ int main(int, char**) {
|
||||
|
||||
auto devices = icsneo::FindAllDevices();
|
||||
|
||||
if(devices.size() == 0) {
|
||||
std::cout << "No device found" << std::endl;
|
||||
if(devices.empty()) {
|
||||
auto lastError = icsneo::GetLastError();
|
||||
if(lastError.getType() != icsneo::APIEvent::Type::NoErrorFound)
|
||||
std::cout << lastError << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user