Exception Management

Functional Guide | Reference: GetPixel, What

////////////////////////////////////////////
// This code snippet shows how to manage  //
// Open eVision exceptions.               //
////////////////////////////////////////////

try
{
	// Image constructor
	EImageC24 srcImage;

	// ...

	// Retrieve the pixel value at coordinates (56, 73)
	EC24 value= srcImage.GetPixel(56, 730);
}

catch(Euresys::Open_eVision_1_1::EException exc)
{
	// Retrieve the exception description
	std::string error = exc.What();
}
////////////////////////////////////////////
// This code snippet shows how to manage  //
// Open eVision exceptions.               //
////////////////////////////////////////////

try
{
    // Image constructor
    EImageC24 srcImage= new EImageC24();

    // ...

    // Retrieve the pixel value at coordinates (56, 73)
    EC24 value= srcImage.GetPixel(56, 73);
}

catch(EException exc)
{
    // Retrieve the exception description
    string error = exc.What();
}