|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "metadata": {}, |
| 5 | + "cell_type": "markdown", |
| 6 | + "source": [ |
| 7 | + "# EDT Errors\n", |
| 8 | + "\n", |
| 9 | + "A simple notebook presenting the `error` helper to print nice error messages, also from EDT." |
| 10 | + ] |
| 11 | + }, |
| 12 | + { |
| 13 | + "metadata": { |
| 14 | + "ExecuteTime": { |
| 15 | + "end_time": "2025-07-28T09:35:51.997620Z", |
| 16 | + "start_time": "2025-07-28T09:35:51.719310Z" |
| 17 | + } |
| 18 | + }, |
| 19 | + "cell_type": "code", |
| 20 | + "source": "%use intellij-platform", |
| 21 | + "outputs": [ |
| 22 | + { |
| 23 | + "data": { |
| 24 | + "text/plain": [ |
| 25 | + "IntelliJ Platform integration is loaded" |
| 26 | + ] |
| 27 | + }, |
| 28 | + "metadata": {}, |
| 29 | + "output_type": "display_data", |
| 30 | + "jetTransient": { |
| 31 | + "display_id": null |
| 32 | + } |
| 33 | + } |
| 34 | + ], |
| 35 | + "execution_count": 1 |
| 36 | + }, |
| 37 | + { |
| 38 | + "metadata": { |
| 39 | + "ExecuteTime": { |
| 40 | + "end_time": "2025-07-28T09:35:52.043794Z", |
| 41 | + "start_time": "2025-07-28T09:35:52.015087Z" |
| 42 | + } |
| 43 | + }, |
| 44 | + "cell_type": "code", |
| 45 | + "source": [ |
| 46 | + "runInEdt {\n", |
| 47 | + " error(\"Oh no!\")\n", |
| 48 | + "}" |
| 49 | + ], |
| 50 | + "outputs": [ |
| 51 | + { |
| 52 | + "ename": "org.jetbrains.kotlinx.jupyter.api.exceptions.ReplUnwrappedExceptionImpl", |
| 53 | + "evalue": "Oh no!", |
| 54 | + "output_type": "error", |
| 55 | + "traceback": [ |
| 56 | + "Oh no!" |
| 57 | + ] |
| 58 | + } |
| 59 | + ], |
| 60 | + "execution_count": 2 |
| 61 | + }, |
| 62 | + { |
| 63 | + "metadata": {}, |
| 64 | + "cell_type": "code", |
| 65 | + "source": "error(\"This shouldn't be executed\")", |
| 66 | + "outputs": [], |
| 67 | + "execution_count": null |
| 68 | + } |
| 69 | + ], |
| 70 | + "metadata": { |
| 71 | + "kernelspec": { |
| 72 | + "display_name": "Kotlin", |
| 73 | + "language": "kotlin", |
| 74 | + "name": "kotlin" |
| 75 | + }, |
| 76 | + "language_info": { |
| 77 | + "name": "kotlin", |
| 78 | + "version": "1.9.23", |
| 79 | + "mimetype": "text/x-kotlin", |
| 80 | + "file_extension": ".kt", |
| 81 | + "pygments_lexer": "kotlin", |
| 82 | + "codemirror_mode": "text/x-kotlin", |
| 83 | + "nbconvert_exporter": "" |
| 84 | + }, |
| 85 | + "ktnbPluginMetadata": { |
| 86 | + "sessionRunMode": "IDE_PROCESS" |
| 87 | + } |
| 88 | + }, |
| 89 | + "nbformat": 4, |
| 90 | + "nbformat_minor": 0 |
| 91 | +} |
0 commit comments