Click or drag to resize

GeneralLastError Method

Retrieve the last error message.

Namespace: FirmaSAT
Assembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntax
public static string LastError()

Return Value

String
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().
Example
C#
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)
See Also