---
title: "BarcodeGeneratorElement.ThrowExceptionWhenCodeTextIncorrect"
url: "https://reference.aspose.com/barcode/net/aspose.barcode.wpf/barcodegeneratorelement/throwexceptionwhencodetextincorrect/"
product: "Aspose.BarCode for .NET API Reference"
description: "BarcodeGeneratorElement property. Only for 1D barcodes. If codetext is incorrect and value set to true  exception will be thrown. Otherwise codetext will be corrected to match barcodes specification"
---

## BarcodeGeneratorElement.ThrowExceptionWhenCodeTextIncorrect property

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.

```csharp
public bool ThrowExceptionWhenCodeTextIncorrect { get; set; }
```

### See Also

* class [BarcodeGeneratorElement](../)
* namespace [Aspose.BarCode.WPF](../../../aspose.barcode.wpf/)
* assembly [Aspose.BarCode](../../../)


