added error checking for broken events which cannot be converted to iCal, e.g. because of a missing timezone definition (SF #1685637)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@321 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
parent
3ac3d9905b
commit
3c40292066
|
@ -423,6 +423,9 @@ icalcomponent *EvolutionCalendarSource::retrieveItem(const string &uid)
|
|||
&gerror)) {
|
||||
throwError(string("retrieving item: ") + uid, gerror);
|
||||
}
|
||||
if (!comp) {
|
||||
throw runtime_error(string("could not retrieve item: ") + uid);
|
||||
}
|
||||
|
||||
return comp;
|
||||
}
|
||||
|
@ -433,6 +436,9 @@ string EvolutionCalendarSource::retrieveItemAsString(const string &uid)
|
|||
eptr<char> icalstr;
|
||||
|
||||
icalstr = e_cal_get_component_as_string(m_calendar, comp);
|
||||
if (!icalstr) {
|
||||
throw runtime_error(string("could not encode item as iCal: ") + uid);
|
||||
}
|
||||
return string(icalstr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue