--- smsdaemon/plugins/TogPlugin.cpp 2008/06/12 12:43:29 63 +++ smsdaemon/plugins/TogPlugin.cpp 2008/08/24 17:57:04 109 @@ -1,5 +1,6 @@ #include "TogPlugin.h" -#include "GsmModem.h" +#include "IGsmModem.h" +#include "Sms.h" #include "TrainInfo.h" #include "util.h" @@ -7,6 +8,8 @@ #include #include +#include "common.h" + using namespace std; @@ -17,7 +20,7 @@ _stationInfo["ul"] = StationInfo("UP","Ulstrup"); _stationInfo["bj"] = StationInfo("BJ","Bjerringbro"); _stationInfo["vi"] = StationInfo("VG","Viborg"); - _stationInfo["hø"] = StationInfo("HØ","Højslev"); + _stationInfo["ho"] = StationInfo("HØ","Højslev"); _stationInfo["sk"] = StationInfo("SK","Skive"); } @@ -57,7 +60,7 @@ data = Util::str_gsm2latin(data);; data = Util::str_tolower(data); - + if (data == "") { modem.SendSms(sms.sender, "Usage: tog \ntog list - liste over stationer", false); @@ -84,9 +87,9 @@ { infos = GetTrainInfo( code , "" ); } - catch(...) + catch(std::exception& e) { - modem.SendSms(sms.sender, "Connection timeout", false ); + modem.SendSms(sms.sender, e.what(), false ); return; }