The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exception handling of running functions in a dialog
#1
Hello,
Running the function(func3) from the dialog, I have encountered the following problems

about func3:
line 1.
Will pop up an error message,I don't want to pop up an error warning, I need to continue

line 2.
Dialog will lose response, QM quit unexpectedly, dialog crashes

 My Request:
1.When the above three lines of code have an error, run the 5th line code directly.

2.Executing some function through the button in the dialog box, any abnormality in the function will cause the dialog box to close unexpectedly, how to prevent it?

is it possible? Any suggestions are welcome, thanks in advance

Function func3
Code:
Copy      Help
run "abc" ;err ;;Will pop up an error message,I don't want to pop up an error warning, I need to continue
int w=wait(30 WA win("" "Notepad")) ;err ;;Will lose response, QM quit unexpectedly, dialog crashes
act w ;err
;Request: When the above three lines of code have an error, run the 5th line code directly.
MES m.timeout=3; m.style="OCa"; m.default='C'
mes("There are already 3 lines of commands skipped above" "" m)


Macro Macro8
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Button 0x54032000 0x0 88 48 48 14 "func3"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 ;;func3
,func3
ret 1


Messages In This Thread
Exception handling of running functions in a dialog - by win - 06-29-2019, 03:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)