Código: Selecionar todos
#include <hmg.ch>
#include "hbclass.ch"
CREATE CLASS tMinhaClasse
PROTECTED:
DATA cMensagem INIT ""
EXPORTED:
METHOD New() CONSTRUCTOR
ON ERROR MetodoDesconhecido()
ENDCLASS
*------------------------------------------
METHOD New(cArqDB) CLASS tMinhaCasse
*-----------------------------------------
// seu código construtor aqui
Return Self // retorna self
*------------------------------------------
METHOD MedodoDesconhecido() CLASS tMInhaClasse
*-----------------------------------------
// esse método é chamado quando ocorrer erro
MSGINFO("Método desconhecido: tMinhaCasse " )
Return Self // construtor retorna self
https://programandoxbase.wordpress.com/ ... -on-error/


