Commit 17b0e047 authored by Ricki Hirner's avatar Ricki Hirner

Wrap IllegalArgumentExceptions in InvalidCalendarException; update Kotlin/gradle

parent d36b93cc
buildscript {
ext.kotlin_version = '1.3.11'
ext.kotlin_version = '1.3.20'
ext.dokka_version = '0.9.17'
repositories {
......@@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
}
......
......@@ -77,7 +77,9 @@ class Event: ICalendar() {
try {
ical = calendarBuilder().build(reader)
} catch(e: ParserException) {
throw InvalidCalendarException("Couldn't parse iCalendar resource", e)
throw InvalidCalendarException("Couldn't parse iCalendar object", e)
} catch(e: IllegalArgumentException) {
throw InvalidCalendarException("iCalendar object contains invalid value", e)
}
// fill calendar properties
......
......@@ -65,8 +65,10 @@ class Task: ICalendar() {
val ical: Calendar
try {
ical = calendarBuilder().build(reader)
} catch (e: ParserException) {
throw InvalidCalendarException("Couldn't parse iCalendar resource", e)
} catch(e: ParserException) {
throw InvalidCalendarException("Couldn't parse iCalendar object", e)
} catch(e: IllegalArgumentException) {
throw InvalidCalendarException("iCalendar object contains invalid value", e)
}
val vToDos = ical.getComponents<VToDo>(Component.VTODO)
......
Markdown is supported
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