User Tools

Site Tools


pt:errorcodes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pt:errorcodes [2016/01/01 22:47]
pt:errorcodes [2020/02/28 10:46] (current)
Line 1: Line 1:
 +==== Códigos de erro ====
 +
 +==== Descrição ====
 +
 +Esta é uma lista de números de código de erro de tempo de execução devolvidos pelo [[lasterror|LastError]] e mensagens de erro de função, bem como o texto (traduzido) devolvido pelo [[Lasterrormessage|Função de LastErrorMessage]].  
 +
 +|Erro # | |Erro (descrição) | 
 +|1|ERROR_NOSUCHLABEL|"Sem tal rótulo "
 +|2|ERROR_FOR1|"FOR ilegal - iniciar número > terminar o número "
 +|3|ERROR_FOR2|"FOR ilegal - iniciar número < terminar o número "
 +|4|ERROR_NEXTNOFOR|"Próximo sem FOR "
 +|5|ERROR_FILENUMBER|"Número de arquivo inválido "
 +|6|ERROR_FILEOPEN|"Não é possível abrir o arquivo "
 +|7|ERROR_FILENOTOPEN|"Arquivo não aberto. "
 +|8|ERROR_FILEWRITE|"Não é possível gravar no arquivo "
 +|9|ERROR_FILERESET|"Não é possível redefinir o arquivo "
 +|10|ERROR_ARRAYSIZELARGE|"Dimensão de matriz muito grande "
 +|11|ERROR_ARRAYSIZESMALL|"Dimensão de matriz muito pequena "
 +|12|ERROR_NOSUCHVARIABLE|"Variável desconhecida "
 +|13|ERROR_NOTARRAY|"Não é uma variável de matriz "
 +|14|ERROR_NOTSTRINGARRAY|"Não uma variável de matriz de seqüência de caracteres "
 +|15|ERROR_ARRAYINDEX|"Índice de matriz fora dos limites "
 +|16|ERROR_STRNEGLEN|"Le substring...
 +<code>
 +# test error trapping
 +onerror nicetrap
 +print 1
 +next haha
 +print 2
 +open 999, "bogus.file"
 +print "Runs Anyway"
 +
 +# test error trapping off and fail at any error (default)
 +offerror
 +print 3
 +next hoho
 +print "never get here"
 +
 +end
 +
 +nicetrap:
 +# this is the nice error handler
 +print "trap and run - error on line " + lasterrorline + " - error number " + lasterror + " message " + lasterrormessage + " (" + lasterrorextra + ")"
 +return
 +</code>
 +will display\\
 +<code>
 +1
 +trap and run - error on line 4 - error number 4 message Next without FOR ()
 +2
 +trap and run - error on line 6 - error number 5 message Invalid File Number ()
 +Runs Anyway
 +3
 +ERROR on line 12: Next without FOR 
 +</code>
 +
 +==== Ver também ====
 +[[Lasterror|Lasterror]], [[Lasterrorextra|Lasterrorextra]], [[Lasterrorline|Lasterrorline]], [[Lasterrormessage|Lasterrormessage]], [[Offerror|Offerror]], [[Onerror|Onerror]], [[ThrowError|ThrowError]]