Skip to content

Don't throw bare string "Failed to find state" #3226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/analyses/ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class ait:public ai_baset
{
typename state_mapt::iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand All @@ -314,7 +314,7 @@ class ait:public ai_baset
{
typename state_mapt::const_iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand Down Expand Up @@ -355,7 +355,7 @@ class ait:public ai_baset
{
typename state_mapt::const_iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand Down
8 changes: 4 additions & 4 deletions src/analyses/static_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class static_analysist:public static_analysis_baset
{
typename state_mapt::iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand All @@ -300,7 +300,7 @@ class static_analysist:public static_analysis_baset
{
typename state_mapt::const_iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand All @@ -324,7 +324,7 @@ class static_analysist:public static_analysis_baset
{
typename state_mapt::iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand All @@ -333,7 +333,7 @@ class static_analysist:public static_analysis_baset
{
typename state_mapt::const_iterator it=state_map.find(l);
if(it==state_map.end())
throw "failed to find state";
throw std::out_of_range("failed to find state");

return it->second;
}
Expand Down