main.cpp: Add error messages for SDL functions