ErrorOut-Script

  • 10 August 2018
  • Sean Huggans
Description: 

Function can be used in application package/adjustments/shimming scripts to error out the installation and cause the detection to fail if the scripts progress log is used as part of your detection method.

Language: 
Powershell
Usage Type: 
Packaging Function
Script Source: 
function ErrorOut-Script {
    ########################################
    # Error Out the package script
    # Function Date: 18.4.14.1
    # Function By: Sean Huggans
    ########################################
    Log-Action -Message "Script is aborting!  See any details above!"
    # Move the log in case it is used as part of a detection method
    Move-Item -Path $LogPath "$($LogDir)\Error-Result.log" -force -confirm:$false
    exit
}
Note: that all applications posted here are posted for use, both commercial and non-commercial, free of charge, and as such are provided as-is, without warranty of any kind whatsoever. visuaFUSION, FMSCUG or any other program listed here's author are not responsible for any damages or shortcomings that result from usage of any of these applications.
Error | visuaFUSION Systems Solutions Blog

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /mnt/home/visuafus/public_html/bahusa.net/includes/common.inc:2861) in drupal_send_headers() (line 1551 of /mnt/home/visuafus/public_html/bahusa.net/includes/bootstrap.inc).
  • Error: Call to undefined function mail() in DefaultMailSystem->mail() (line 79 of /mnt/home/visuafus/public_html/bahusa.net/modules/system/system.mail.inc).

Error

The website encountered an unexpected error. Please try again later.