在弹出警报中而不是在状态栏中显示错误消息

Show the error message in a popup alert rather then on status bar

如何在类似于下图的弹出警告框中显示错误消息。

我目前正在使用的代码。

BEGIN
    IF( Condition )THEN
        --Show the error as popup alert message box
        MESSAGE("This is an error.");
        RAISE FORM_TRIGGER_FAILURE;
    END IF;
END;

基本上,如果您重复该消息,您将收到弹出式警报,而不是进入状态栏:

BEGIN
    IF( Condition )THEN
        --Show the error as popup alert message box
        MESSAGE('This is an error.');
        MESSAGE('This is an error.');
        RAISE FORM_TRIGGER_FAILURE;
    END IF;
END;

或按以下方式尝试:

BEGIN
    IF( Condition )THEN
        --Show the error as popup alert message box
        FOR i IN 1..2
        LOOP
          MESSAGE('This is an error.');
        END LOOP;            
        RAISE FORM_TRIGGER_FAILURE;
    END IF;
END;

或者将第二个作为空字符串(无需重复):

BEGIN
    IF( Condition )THEN
        --Show the error as popup alert message box
        MESSAGE('This is an error.');
        MESSAGE('');
        RAISE FORM_TRIGGER_FAILURE;
    END IF;
END;