Exceptions

Built-in errors

Built-in errors

Syntax errors

Syntax errors are faults in the source code, such as misspellings and punctuation, wrong labeling, and so forth, that result in the interpreter producing an error message. We can find these expressions in Topaz as explained below:

Code Message Additional details
TS000 Unknown. Unknown and unexpected error.
TS001 Cannot open or read file "%s".
TS002 Illegal character "%s".
TS003 Illegal qualifier "%s".  
TS004 Illegal expression.
TS005 "%s" expected but "%s" found.
TS006 "%s" is not a valid number.
TS007 Incorrect use of numeric separator.
TS008 Illegal assignment.
TS009 Invalid escape sequence in enhanced string: \%s.
TS010 Invalid Unicode code point: U+%06s.
TS011 Invalid inline expression.
TS012 Invalid type declaration.
TS013 Directive "%s" is already set.
TS014 Duplicate identifier "%s".
TS015 Identifier "%s" not found.
TS016 An abstract function cannot have any implementation.
TS017 The names of namespace parts, functions, parameters, modules, aliases and exports cannot be names of built-in elements.
TS018 "%s" instruction cannot be placed outside the loop.
Built-in errors

Runtime errors

Program errors that arise during program execution after successful interpretation are known as runtime errors. These mistakes are listed in the following manner:

Code Message Additional details
TR000 Unknown. Unknown and unexpected error.
TR001 Keyboard interrupt. CTRL + C signal.
TR002

TR003

TR004

TR005

TR006

TR007

TR008

TR009

TR010

TR011

TR012

TR013

TR014

TR015

TR016

TR017

TR018

TR019

TR020

TR021

TR022

TR023

Built-in errors

Warnings

Warnings are unique exceptions in that they only send information to the stderr stream in order to obtain more details about a specific code segment. Below is a description of them:

Code Message Additional details
TW000 Unknown. Unknown and unexpected warning.
TW001 Note: %s Displays a hint directive that contains information about a piece of code that is deprecated, experimental, platform dependent, unimplemented, or custom.
TW002 Attempting to allocate a large number of bytes. For instance, it shows up when you attempt to make a giant a array or allocate a significant amount of memory for a pointer.
TW003

User defined exceptions