cpp-terminal icon indicating copy to clipboard operation
cpp-terminal copied to clipboard

adding more exeptions

Open MCWertGaming opened this issue 3 years ago • 0 comments

cpp-terminal is currently not checking that much for legal inputs on some functions. For example: Term::Window_24bit scr(0, 0, 10, 10); returns a segmentation fault, because the used vectors of the window class can't have negative places. we should simply throw a std::runtime_error here. That would include:

  • Term::Window
  • Term::Window_24bit
  • (with some functions, like Term::Window::fill_bg)
  • Term::color
  • Term::color_24bit and probably all other functions without enforced types (like enums)

MCWertGaming avatar Mar 02 '21 15:03 MCWertGaming