Retrieve the last error message.
Namespace:
FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.50.0.29531
Syntax
C# |
---|
public static string LastError() |
Visual Basic (Declaration) |
---|
Public Shared Function LastError As String |
Return Value
Error message from last call (may be empty)
Remarks
Call this immediately when an error is indicated.
Calling another method will overwrite the message.
This is the same as Sat.LastError().
Examples

int n = Sat.ValidateXml("cfdv33a-badspec.xml"); Console.WriteLine("Sat.ValidateXml returns {0}", n); // Sat.ValidateXml returns -27 Console.WriteLine(General.ErrorLookup(n)); // Invalid XML format/No valido formato XML (BAD_XML_ERROR) Console.WriteLine(General.LastError()); // XML validation error/Error al validar XML: Required attribute 'Importe' missing for element 'cfdi:Concepto' (Line/numero de linea: 12); // XML validation error/Error al validar XML: Required attribute 'Importe' missing for element 'cfdi:Concepto' (Line/numero de linea: 13)