private fun startContext(crawlJob: CrawlJob) { LOGGER.debug("Starting context") val ac: PathSharingContext = crawlJob.getJobContext() ac.addApplicationListener(this) try { ac.start() } catch (be: BeansException) { LOGGER.warn(be.getMessage()) ac.close() } catch (e: Exception) { LOGGER.warn(e.message) try { ac.close() } catch (e2: Exception) { e2.printStackTrace(System.err) } finally { } } LOGGER.debug("Context started") }
Start the context , catching and reporting any BeansExceptions .