Commit 1a600b0e authored by Sébastien Timmermans's avatar Sébastien Timmermans
Browse files

[ErrMsg][Dirdyn]Real-time add warning msg for not handled errors

parent c73f7397
......@@ -67,6 +67,7 @@ namespace OpenGLMbs {
if (cur_i != nb_q)
{
std::cout << "AnimReader error: number of joints not consistend (" << cur_i << " >< " << nb_q << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......@@ -79,12 +80,14 @@ namespace OpenGLMbs {
if (t_size <= 0)
{
std::cout << "AnimReader error: t_vec size (" << t_size << ") should be strictly positive !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
if (t_size != (int)q_tab.size())
{
std::cout << "AnimReader error: t_vec size (" << t_size << ") different from q_tab size (" << q_tab.size() << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -96,6 +99,7 @@ namespace OpenGLMbs {
if (diff_t < 0.0)
{
std::cout << "AnimReader error: final time should be bigger than initial time !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......@@ -194,6 +198,7 @@ namespace OpenGLMbs {
if (this->nb_q != nb_q)
{
std::cout << "AnimReader error: nb_q (" << nb_q << ") should be " << this->nb_q << " !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -243,6 +248,7 @@ namespace OpenGLMbs {
if (this->nb_q != nb_q)
{
std::cout << "AnimReader error: nb_q (" << nb_q << ") should be " << this->nb_q << " !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -98,6 +98,7 @@ namespace OpenGLMbs {
default:
std::cout << "Joint3D error: unknown joint type (" << joint_type << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......
......@@ -227,6 +227,7 @@ namespace OpenGLMbs {
default:
std::cout << "Mbs3DComponent error: unknwon comp_type (" << comp_type << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -1268,7 +1268,7 @@ int opengl_proc_unix_start_fork(MbsData *mbs_data, Realtime_visu *visu, OpenGlIn
{
std::cout << "open_gl_c_int error ROS with \"execv\": " << exe_proc_ros << " not found !" << std::endl;
std::cout << "Please put your catkin workspace in your home directory !" << std::endl;
exit(EXIT_FAILURE);
return _MBS_ERR_MOD_SPEC_13;
}
}
else
......
......@@ -61,6 +61,7 @@ int main(int argc, char const *argv[])
if ((hdl_out == INVALID_HANDLE_VALUE) || (hdl_in == INVALID_HANDLE_VALUE))
{
std::cout << "open_gl_process error when getting the handles." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -206,6 +207,7 @@ int main(int argc, char const *argv[])
default:
std::cout << "open_gl_win_process error: unknown state flag (" << flag_state << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......
......@@ -87,6 +87,7 @@ namespace OpenGLMbs {
if (doc == NULL)
{
std::cout << "shader_multisample warning: invalid XML document" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -95,6 +96,7 @@ namespace OpenGLMbs {
if (root == NULL)
{
std::cout << "shader_multisample warning: empty XML document" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
xmlFreeDoc(doc);
exit(EXIT_FAILURE);
}
......@@ -103,6 +105,7 @@ namespace OpenGLMbs {
if (strcmp((const char*)root->name, "mbsDescR7"))
{
std::cout << "shader_multisample warning : xml is not a mbsDescR7" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
xmlFreeDoc(doc);
exit(EXIT_FAILURE);
}
......@@ -113,6 +116,7 @@ namespace OpenGLMbs {
if (x3D_n == NULL)
{
std::cout << "shader_multisample warning : x3D not found !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
xmlFreeDoc(doc);
exit(EXIT_FAILURE);
}
......@@ -143,6 +147,7 @@ namespace OpenGLMbs {
else
{
std::cout << "shader_multisample error : unknown shader flag : " << (const char*)elem_val << " !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......
......@@ -1387,7 +1387,8 @@ namespace OpenGLMbs {
void VrmlLoader::Error(const char* message) {
std::cout << "ERROR parsing vrml " << vrml_file << " at line " << current_line_nb
<< " : " << message << " : " << (pch != NULL ? pch : "null") << std::endl;
exit(0);
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
/**
......
......@@ -124,6 +124,7 @@ namespace OpenGLMbs {
if (world_3d->GetNbLights() > MAX_NB_LIGHTS)
{
std::cout << "MbsWorld3D error: only " << MAX_NB_LIGHTS << " lights should be added (" << world_3d->GetNbLights() << " received)." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -187,6 +188,7 @@ namespace OpenGLMbs {
default:
std::cout << "MbsShape3D error: unknown light type (" << cur_ligt->GetType() << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -201,6 +203,7 @@ namespace OpenGLMbs {
if (sh_lights.size() > MAX_NB_LIGHTS)
{
std::cout << "MbsWorld3D error: only " << MAX_NB_LIGHTS << " shader lights should be added (" << sh_lights.size() << " received)." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -351,6 +354,7 @@ namespace OpenGLMbs {
default:
std::cout << "MbsShape3D error: unknown light type (" << cur_ligt->GetType() << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......@@ -646,6 +650,7 @@ namespace OpenGLMbs {
default:
std::cout << "MbsShape3D error: unknown light type (" << cur_light->GetType() << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -674,6 +679,7 @@ namespace OpenGLMbs {
default:
std::cout << "MbsShape3D error: unknown light type (" << cur_light->GetType() << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -694,6 +700,7 @@ namespace OpenGLMbs {
if (shader_flag != SHADOW_MAPPING_SHADER)
{
std::cout << "MbsShape3D error: function ShadowDepth should not be called with flag " << shader_flag << " !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -53,6 +53,7 @@ namespace OpenGLMbs {
if (glewInit() != GLEW_OK)
{
std::cout << "Error: failed to initialize GLEW !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -169,6 +170,7 @@ namespace OpenGLMbs {
default:
std::cout << "MbsWorld3D error: unknwon shader type (" << shader_flag << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......@@ -223,6 +225,7 @@ namespace OpenGLMbs {
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
{
std::cout << "MbsShape3D error: frame buffer bad initialization !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -114,7 +114,7 @@ namespace OpenGLMbs {
// print error
std::cout << "------- Shader linking error -------\n" << er_char << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
// release memory
delete[] er_char;
glDeleteProgram(program_id);
......@@ -151,6 +151,7 @@ namespace OpenGLMbs {
if (shader_id == 0)
{
std::cout << "Shader error: " << type << " is not a correct type !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -161,6 +162,7 @@ namespace OpenGLMbs {
if (!f_in)
{
std::cout << "Shader error: " << file_in << " cannot be open !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -202,6 +204,7 @@ namespace OpenGLMbs {
delete[] er_char;
glDeleteShader(shader_id);
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
}
......
......@@ -140,6 +140,7 @@ namespace OpenGLMbs {
!int_in_range(i2, 0, nb_vert - 1))
{
std::cout << "Basic shape loading error: coordinate vertex error." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -239,6 +240,7 @@ namespace OpenGLMbs {
{
std::cout << "MbsShape3D error in sizes: vertices (" << vert_size
<< ") ; colors (" << colors.size() << ")." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -299,6 +301,7 @@ namespace OpenGLMbs {
std::cout << "MbsShape3D error in sizes: temp_vertices (" << vert_size
<< ") ; temp_colors (" << temp_colors.size()
<< ") ; temp_normals (" << temp_normals.size() << ")." << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -203,6 +203,7 @@ namespace OpenGLMbs {
default:
std::cout << "Error: unknown mouse state (" << state << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
......@@ -20,6 +20,7 @@ namespace OpenGLMbs {
if (!glfwInit())
{
std::cout << "Error: failed to initialize GLFW !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -38,6 +39,7 @@ namespace OpenGLMbs {
if (win == NULL)
{
std::cout << "Error: failed to open GLFW window !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
glfwTerminate();
exit(EXIT_FAILURE);
}
......
......@@ -158,6 +158,7 @@ namespace OpenGLMbs {
if (nb_q != nb_q_check)
{
std::cout << "MbsWorld3D error: nb_q (" << nb_q << ") different from number of joints (" << nb_q_check << ") !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......@@ -203,6 +204,7 @@ namespace OpenGLMbs {
if (view_list.size() <= 0)
{
std::cout << "Error: at least one MbsViewPoint must be defined !" << std::endl;
std::cout << "[REAL-TIME] Error not yet handled in mbsysC !!! " << std::endl;
exit(EXIT_FAILURE);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment