Better error handling for AI tools<

This commit is contained in:
Bane Stojkovic
2026-02-21 22:36:32 +01:00
parent 03af702933
commit a7442e14e4
13 changed files with 37 additions and 11 deletions
@@ -13,6 +13,7 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.List;
import java.util.Optional;
public class AiAnalyzeAction extends AbstractAction {
@@ -41,7 +42,9 @@ public class AiAnalyzeAction extends AbstractAction {
@Override
public void failed(Exception e) {
swingUI.showMessage(e.getMessage(), "AI Circuit Analyzer", ISwingUI.ERROR_MESSAGE);
String message =
Optional.ofNullable(e.getCause()).map(Throwable::getMessage).orElse(e.getMessage());
swingUI.showMessage(message, "AI Circuit Analyzer", ISwingUI.ERROR_MESSAGE);
}
@Override
@@ -358,6 +358,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Halbleiter
Send Backward|Absenken
Send Selection to Back|Auswahl nach den Boden senden
Server error, please try again.|Serverfehler, bitte versuchen Sie es erneut.
Seven|Sieben
Shaft Down|Achse nach unten
Shaft Up|Achse nach oben
@@ -346,6 +346,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors
Send Backward
Send Selection to Back
Server error, please try again.
Seven
Shaft Down
Shaft Up
@@ -346,6 +346,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Semiconductores
Send Backward|Enviar Atrás
Send Selection to Back|Enviar Selección Atrás
Server error, please try again.|Error del servidor, inténtelo de nuevo.
Seven|Siete
Shaft Down|Eje Abajo
Shaft Up|Eje Arriba
@@ -343,6 +343,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Semi-conducteurs
Send Backward|Envoyer vers l'arrière
Send Selection to Back|Envoyer la sélection vers l'arrière
Server error, please try again.|Erreur du serveur, veuillez réessayer.
Seven|Sept
Shaft Down|Tige vers le bas
Shaft Up|Tige vers le haut
@@ -358,6 +358,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Semiconduttori
Send Backward|Invia indietro
Send Selection to Back|Invia selezione indietro
Server error, please try again.|Errore del server, riprova.
Seven|sette
Shaft Down|Shaft Down
Shaft Up|Shaft Up
@@ -358,6 +358,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Transistors
Send Backward|Verlagen
Send Selection to Back|Selectie naar bodem zenden
Server error, please try again.|Serverfout, probeer het opnieuw.
Seven|Zeven
Shaft Down|As naar beneden
Shaft Up|As omhoog
@@ -346,6 +346,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Semicondutores
Send Backward|Enviar para trás
Send Selection to Back|Enviar seleção para trás
Server error, please try again.|Erro do servidor, tente novamente.
Seven|Sete
Shaft Down|Jogar para baixo
Shaft Up|Jogar para cima
@@ -339,6 +339,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|Poluprovodnici
Send Backward|Pošalji Nazad
Send Selection to Back|Pošalji Izabrane Nazad
Server error, please try again.|Greška servera, pokušajte ponovo.
Seven|Sedam
Shaft Down|Osovina Dole
Shaft Up|Osovina Gore
@@ -346,6 +346,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|सेमीकंडक्टर्स
Send Backward|पीछे भेजें
Send Selection to Back|चयन को पीछे भेजें
Server error, please try again.|सर्वर त्रुटि, कृपया पुनः प्रयास करें।
Seven|सात
Shaft Down|शाफ्ट नीचे
Shaft Up|शाफ्ट ऊपर
@@ -346,6 +346,7 @@ Selection contains components that cannot be rotated. Do you want to exclude the
Semiconductors|半导体
Send Backward|后移一层
Send Selection to Back|将选择移到后面
Server error, please try again.|服务器错误,请重试。
Seven|七
Shaft Down|轴向下
Shaft Up|轴向上