This is a basic set-/get- error class and (in this case) also a function-lib. The main idea it to have a global, central place to stack the errors that occure during execution of your code.
*) BS Language Components are collection of functiona and/or classes that are not inherited by Bs_Object AND are not dependent on any other class or libs that use Bs_Object (to avoid cyclic dependences).
For comfort some short hand function have been defined that base on this class.
bs_setError($msg, $msgType); // Push an error in the global error list
bs_getLastError(); // Get last error from the global error list
bs_getErrors(); // Get all errors as array of strings
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
The idea here: Get an array of all errors that may have accumulated since the last getLastError() OR getLastErrors() call. This happens then when multiple calls to setError() happen before you have the chance to get the last error. (Usually the first error is the most interesting, while the others are usually error of errors).