User Tools

Site Tools


errorhandler_class

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
errorhandler_class [2020/02/21 23:12] sahlerrorhandler_class [2021/02/15 20:56] (current) sahl
Line 7: Line 7:
 ===== Typechecking ===== ===== Typechecking =====
  
-To introduce strict type checking on functions, the class introduces the ''checkParams()'' which takes a variable number of parameters, but always in pairs of two.+To introduce semi-strict type checking on functions, the class introduces the ''checkParams()'' which takes a variable number of parameters, but always in pairs of two.
  
 One pass a variable to the function and then a type name, and if the variable doesn't match the given type, then an error is triggered. One pass a variable to the function and then a type name, and if the variable doesn't match the given type, then an error is triggered.
Line 38: Line 38:
 |resource| |resource|
 |boolean| |boolean|
 +
 +integer and floats are checked based on content and not variable type, so a string containing a valid integer number will pass as a integer.
errorhandler_class.1582326725.txt.gz · Last modified: 2020/02/21 23:12 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki