Compiles the given shader with error handling