|| ![EAGLContext setCurrentContext: aGLContext])
{
TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: EAGLContext creation failed");
- Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+ throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString());
return;
}
if (![EAGLContext setCurrentContext: aGLContext])
{
TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: EAGLContext can not be assigned");
- Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+ throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString());
return;
}
if (aGLContext == NULL)
{
TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: NSOpenGLContext creation failed");
- Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+ throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString());
return;
}
if (!aDefFbo->InitWithRB (myGlContext, myWidth, myHeight, GL_RGBA8, GL_DEPTH24_STENCIL8, aWinRBColor))
{
TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: default FBO creation failed");
- Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+ throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString());
return;
}
}
if (!aDefFbo->InitWrapper (myGlContext))
{
TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: default FBO wrapper creation failed");
- Aspect_GraphicDeviceDefinitionError::Raise (aMsg.ToCString());
+ throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString());
return;
}