Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Wrap IllegalArgumentExceptions in InvalidCalendarException; update Kotlin/gradle

parent d36b93cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line

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}"
    }
+3 −1
Original line number Diff line number Diff line
@@ -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
+4 −2
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ class Task: 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)
            }

            val vToDos = ical.getComponents<VToDo>(Component.VTODO)