Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fehlermeldung anzeige bei Oracle

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

könnte ihr mir erklären, wie ich in einem PL/SQL-Block bei einer Exception die genaue Fehlermeldung erhalte?

z.B.

BEGIN

statement1

statement2

statement3

EXCEPTION

WHEN others THEN dbms_output.put_line(sqlerrm);

END;

So erhalte ich zwar die Fehlermeldung, nicht jedoch die Zeile, in der der Fehler entstanden ist. Nehme ich die Exception raus und das Script läuft auf einen Fehler, zeigt mir z.B. sqlplus den Fehler mit Zeilennummer an...

Ich hoffe es war alles verständlich und es kann mir jemand helfen...

Gruss, Axl

PS. Handelt sich um eine Oracle 8.1.7 DB

hi,

schon mal das probiert?


DECLARE

fehler exception;

BEGIN

statement1

statement2

statement3

if blablabla = blafoo then

   raise fehler;

end if;

EXCEPTION

WHEN fehler THEN 

    raise_application_error (-20000, 'mein benutzerdefinierter fehler');

when others then

    dbms_output.put_line('SQLCODE: ' || to_char(SQLCODE));

END;

s'Amstel

Nee, hatte ich bisher noch nicht, aber ich wüsste auch nicht in wie fern mir das bei meinem Problem helfen soll.

Ich will wissen, wo genau der Fehler entstanden ist, in welcher Zeile im Quellcode.

Trotzdem Danke für die Antwort.

Gruss, Axl

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.