diff --git a/doc/CODING.md b/doc/CODING.md index e39e797f043e09a8f1db678f29f087a0442e41d6..6724b2e642ed09385792398d5171fb2c39a72866 100644 --- a/doc/CODING.md +++ b/doc/CODING.md @@ -99,12 +99,12 @@ Upload Upload to server, before 'save' ............................... -* If a user open's a file for upload via the browse button, that file is immediately transmitted to the server. The user will see a turning wheel during until the upload finished. +* If a user open's a file for upload via the browse button, that file is immediately transmitted to the server. The user will see a turning wheel until the upload finished. * After successfull upload the 'Browse' button disappears and the filename, plus the delete button, will be displayed (client logic). * The uploaded file will be checked: maxsize, mime type, check script. * The uploaded file is still temporary. It has been renamed from $_SESSION['X'][<uploadSip>][FILES_TMP_NAME] to $_SESSION['X'][<uploadSip>][FILES_TMP_NAME].cached * The upload action will be saved in the user session. - * $_SESSION['X'][<uploadSip>][FILES_TMP_NAME|FILES_NAME|FILES_ERROR|FILE_SIZE] + * $_SESSION['X'][<uploadSip>][FILES_TMP_NAME|FILES_NAME|FILES_ERROR|FILE_SIZE] * Clicks the user on delete button: * In the usersession a flagDelete will be set: $_SESSION['X'][<uploadSip>]['flagDelete']='1' * An optional previous upload file (still not saved on the final place) will be deleted. @@ -112,13 +112,15 @@ Upload to server, before 'save' Form save ......... -* Before building the insert/update, process all 'uploads'. -* Get every uniq sipUpload to every upload formElement. Get the corresponding temporary uploaded filename. -* If $_SESSION['X'][<uploadSip>]['flagDelete']='1' is set, delete prefious uploaded file. -* Calculate <destination> -* mv <file>.cached <destination> -* clientvalue[<feName>] = <destination> -* delete $_SESSION['X'][<uploadSip>] +* Step 1: insert /update the record. +* Step 2: process all 'uploads'. + * Get every uniq sipUpload to every upload formElement. Get the corresponding temporary uploaded filename. + * If $_SESSION['X'][<uploadSip>]['flagDelete']='1' is set, delete prefious uploaded file. + * Calculate <destination> + * mv <file>.cached <destination> + * clientvalue[<feName>] = <destination> + * delete $_SESSION['X'][<uploadSip>] +* Step 3: update record with final `FileDestination' Formelement type: DATE / DATETIME / TIME ---------------------------------------- @@ -144,8 +146,8 @@ Formelement type: DATE / DATETIME / TIME * datetime format: 'DATE TIME' -Debug / Log / Errormessages -=========================== +Debug / Log +=========== * Before firing a SQL or doing processing of an FormElement, set some debugging / error variables: @@ -169,6 +171,20 @@ Debug / Log / Errormessages $this->store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM) === 'yes' +Errormessages & Eceptions +========================= + +* Exception types: + * Code + * Db + * User Form + * user Report + * plus an Errorhandler which throws exceptions + +* Exceptions inside of an API call delivers the error code and msg as JSON to the client. +* Typo3 suppress E_NOTICE (e.g. undefined index). To catch E_NOTICE in QFQ, it will be temporaly enabled in QfqCongroller.php. + + Stores ======