Browse Source

cacth all exceptions in MensaParser

there are many things that can go wrong
pull/18/head
Jannik 3 years ago
parent
commit
9efc7fe4b7
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 2
      build.gradle
  2. 2
      src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt
  3. 2
      src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt
  4. 2
      src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt

2
build.gradle

@ -38,4 +38,4 @@ compileTestKotlin {
}
group 'org.mosad'
version '1.0.2'
version '1.1.1'

2
src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt

@ -50,7 +50,7 @@ class APIController {
var logger: Logger = LoggerFactory.getLogger(APIController::class.java)
private var requestCount = 0
private val startTime = System.currentTimeMillis() / 1000
private val softwareVersion = "1.1.0"
private val softwareVersion = "1.1.1"
private val apiVersion = "1.1.0"
// hso parser links (hardcoded)

2
src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt

@ -50,6 +50,8 @@ class CourseListParser {
}
} catch (ex: SocketTimeoutException) {
logger.warn("timeout from hs-offenburg.de, updating on next attempt!")
} catch (gex: Exception) {
logger.error("general CourseListParser error", gex)
}
return courseLinkList

2
src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt

@ -57,6 +57,8 @@ class MensaParser {
}
} catch (ex: SocketTimeoutException) {
logger.warn("timeout from $menuLink, updating on next attempt!")
} catch (gex: Exception) {
logger.error("general MensaParser error", gex)
}
return mealWeekList

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close