Tag: errors

C

Suppress all error messages in C

SetErrorMode function controls whether the system will handle the specified types of serious errors or whether the process will handle them. #include <Windows.h>   SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);#include <Windows.h> SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);

Microsoft Windows, Monitoring

Display Network Errors

By default, only the numbers of bytes received and sent are displayed in a Network Adapter Status window. We can edit registry to have the number of errors displayed as well. Open registry editor and go to: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNetworkConnections and add a key under Connections, named StatMon. In StatMon, create a DWORD value named ShowLanErrors and …

Drupal, PHP

Show all errors while developing in Drupal

Add the following lines to your local drupal site’s settings.php. error_reporting(-1); $conf[’error_level’] = 2; ini_set(’display_errors’, TRUE); ini_set(’display_startup_errors’, TRUE);error_reporting(-1); $conf[‘error_level’] = 2; ini_set(‘display_errors’, TRUE); ini_set(‘display_startup_errors’, TRUE);

PHP, WEB

Modify error reporting behavior in PHP Part 2

In this article we will see how to handle errors with our own function. PHP allows you to handle errors with the set_error_handler() function. This function takes two arguments. The first argument is the name of our function to handle errors. The second argument allows you to define which errors the function handles. ex. E_ALL, …