- string const dir = String::compose ("%1/%2", wx_to_std (_country->GetStringSelection()), wx_to_std (_cinema->GetStringSelection()));
- list<string> const zips = get_dir (dir);
-
- _serial->Clear ();
- for (list<string>::const_iterator i = zips.begin(); i != zips.end(); ++i) {
- vector<string> a;
- split (a, *i, is_any_of ("-_"));
- if (a.size() >= 4) {
- _serial->Append (std_to_wx (a[3]), new wxStringClientData (std_to_wx (*i)));
+ try {
+ list<string> const s = get_dir (String::compose ("%1/%2", wx_to_std (_country->GetStringSelection()), wx_to_std (_cinema->GetStringSelection())));
+ _serial->Clear ();
+ BOOST_FOREACH (string i, s) {
+ vector<string> a;
+ split (a, i, is_any_of ("-_"));
+ if (a.size() >= 4) {
+ _serial->Append (std_to_wx (a[3]), new wxStringClientData (std_to_wx (i)));
+ }