---
title: "method"
url: "https://reference.aspose.com/barcode/cpp/aspose.barcode.generation/barcodeparameters/set_throwexceptionwhencodetextincorrect/"
product: "Aspose.BarCode for C++ API Reference"
description: " method. Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect in C++."
---

## BarcodeParameters::set_ThrowExceptionWhenCodeTextIncorrect method


Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.

```cpp
void Aspose::BarCode::Generation::BarcodeParameters::set_ThrowExceptionWhenCodeTextIncorrect(bool value)
```

## See Also

* Class [BarcodeParameters](../)
* Namespace [Aspose::BarCode::Generation](../../)
* Library [Aspose.BarCode for C++](../../../)
