[SerializableAttribute()]public enum BarcodeExceptionCode
typedef NS_ENUM(NSInteger, LTBarcodeError) {LTBarcodeErrorInvalidType = -411,LTBarcodeErrorInvalidTextOut = -412,LTBarcodeErrorInvalidWidth = -413,LTBarcodeErrorInvalidHeight = -414,LTBarcodeErrorToSmall = -415,LTBarcodeErrorInvalidBarcodeString = -416,LTBarcodeErrorInvalidUnits = -418,LTBarcodeErrorInvalidMaximumCount = -419,LTBarcodeErrorInvalidGroup = -420,LTBarcodeErrorInvalidStringLength = -424,LTBarcodeErrorInvalidBounds = -425,LTBarcodeErrorBarcode1dLocked = -426,LTBarcodeErrorBarcode2dReadLocked = -427,LTBarcodeErrorBarcode2dWriteLocked = -428,LTBarcodeErrorPdfReadLocked = -429,LTBarcodeErrorPdfWriteLocked = -430,LTBarcodeErrorDatamatrixReadLocked = -432,LTBarcodeErrorDatamatrixWriteLocked = -433,LTBarcodeErrorQrReadLocked = -1380,LTBarcodeErrorQrWriteLocked = -1381,LTBarcodeErrorAztecReadLocked = -1370,LTBarcodeErrorAztecWriteLocked = -1371,LTBarcodeErrorMaxiReadLocked = -1372,LTBarcodeErrorMaxiWriteLocked = -1373,LTBarcodeErrorMicroQrReadLocked = -1374,LTBarcodeErrorMicroQrWriteLocked = -1375,LTBarcodeErrorDllNotFound = -1382,LTBarcodeErrorInvalidXModule = -1481,};
public enum BarcodeExceptionCode [SerializableAttribute()]public enum class BarcodeExceptionCode
class BarcodeExceptionCode(Enum):InvalidXModule = -1481DllNotFound = -1382QrWriteLocked = -1381QrReadLocked = -1380MicroQrWriteLocked = -1375MicroQrReadLocked = -1374MaxiWriteLocked = -1373MaxiReadLocked = -1372AztecWriteLocked = -1371AztecReadLocked = -1370DatamatrixWriteLocked = -433DatamatrixReadLocked = -432PdfWriteLocked = -430PdfReadLocked = -429Barcode2dWriteLocked = -428Barcode2dReadLocked = -427Barcode1dLocked = -426InvalidBounds = -425InvalidStringLength = -424InvalidGroup = -420InvalidMaximumCount = -419InvalidUnits = -418InvalidBarcodeString = -416ToSmall = -415InvalidHeight = -414InvalidWidth = -413InvalidTextOut = -412InvalidType = -411
| Value | Member | Description | 
|---|---|---|
| -1481 | InvalidXModule | Barcode Module size should be greater or equal to 0. | 
| -1382 | DllNotFound | Barcode Engine assembly not found. | 
| -1381 | QrWriteLocked | Barcode Write QR is locked. | 
| -1380 | QrReadLocked | Barcode Read QR is locked. | 
| -1375 | MicroQrWriteLocked | Barcode Write Micro QR is locked | 
| -1374 | MicroQrReadLocked | Barcode Read Micro QR is locked | 
| -1373 | MaxiWriteLocked | Barcode Write Maxi is locked | 
| -1372 | MaxiReadLocked | Barcode Read Maxi is locked | 
| -1371 | AztecWriteLocked | Barcode Write Aztec is locked | 
| -1370 | AztecReadLocked | Barcode Read Aztec is locked. | 
| -433 | DatamatrixWriteLocked | Barcode Write Datamatrix is locked. | 
| -432 | DatamatrixReadLocked | Barcode Read Datamatrix is locked. | 
| -430 | PdfWriteLocked | Barcode Write PDF is locked. | 
| -429 | PdfReadLocked | Barcode Read PDF is locked. | 
| -428 | Barcode2dWriteLocked | Barcode Write 2D is locked. | 
| -427 | Barcode2dReadLocked | Barcode Read 2D is locked. | 
| -426 | Barcode1dLocked | Barcode 1D is locked. | 
| -425 | InvalidBounds | Invalid barcode bounds. | 
| -424 | InvalidStringLength | Invalid barcode data string length. | 
| -420 | InvalidGroup | Invalid barcode group. | 
| -419 | InvalidMaximumCount | Invalid maximum count. | 
| -418 | InvalidUnits | Invalid barcode measurement unit. | 
| -416 | InvalidBarcodeString | Invalid barcode string for a specified barcode symbology. | 
| -415 | ToSmall | Barcode string is too small. | 
| -414 | InvalidHeight | Invalid barcode height. | 
| -413 | InvalidWidth | Invalid barcode width. | 
| -412 | InvalidTextOut | Invalid barcode text out option. | 
| -411 | InvalidType | Invalid barcode symbology. | 
Used as the type of the BarcodeException.Code property which can be used to get extra details about the LEADTOOLS barcode exception being thrown.
using Leadtools;using Leadtools.Codecs;using Leadtools.Barcode;using Leadtools.ImageProcessing;public void BarcodeExceptionCode_Example(){// Example of values passed by the user for the barcode width and heightint barcodeWidth = 30;int barcodeHeight = 60;// These values are too small to write a UPCA barcode and will throw an exception below// Create a Barcode engineBarcodeEngine engine = new BarcodeEngine();// Get the Barcode writerBarcodeWriter writer = engine.Writer;// Create an imageusing (RasterImage image = RasterImage.Create(1000, 1000, 1, 300, RasterColor.FromKnownColor(RasterKnownColor.White))){// Create the barcodeBarcodeData barcode = BarcodeData.CreateDefaultBarcodeData(BarcodeSymbology.UPCA);barcode.Bounds = new LeadRect(0, 0, barcodeWidth, barcodeHeight);// Try to write it, this will throw an exception if the barcode is too smalltry{writer.WriteBarcode(image, barcode, null);}catch (BarcodeException ex){// Show the error message, should be BarcodeExceptionCode.InvalidWidthConsole.WriteLine(ex.Code);Debug.Assert(ex.Code == BarcodeExceptionCode.InvalidWidth);}}}
import java.io.File;import java.io.IOException;import org.junit.*;import org.junit.Test;import org.junit.runner.JUnitCore;import org.junit.runner.Result;import org.junit.runner.notification.Failure;import static org.junit.Assert.*;import leadtools.*;import leadtools.barcode.*;public void barcodeExceptionCodeExample() {// Example of values passed by the user for the barcode width and heightint barcodeWidth = 30;int barcodeHeight = 60;// These values are too small to write a UPCA barcode and will throw an// exception below// Create a Barcode engineBarcodeEngine engine = new BarcodeEngine();// Get the Barcode writerBarcodeWriter writer = engine.getWriter();// Create an imageRasterImage image = RasterImage.create(1000, 1000, 1, 300, RasterColor.fromKnownColor(RasterKnownColor.WHITE));// Create the barcodeBarcodeData barcode = BarcodeData.createDefaultBarcodeData(BarcodeSymbology.UPC_A);barcode.setBounds(new LeadRect(0, 0, barcodeWidth, barcodeHeight));// Try to write it, this will throw an exception if the barcode is too smalltry {writer.writeBarcode(image, barcode, null);} catch (BarcodeException ex) {// Show the error message, should be BarcodeExceptionCode.InvalidWidthSystem.out.println("BarcodeException code: " + ex.getCode());assertTrue(ex.getCode() == BarcodeExceptionCode.INVALID_WIDTH);}}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
