errors

PHP Always run function

I am trying to get some errors returned in JSON format. So, I made a class level var: public $errors = Array(); So, lower down in the script, different functions might return an error, and add their error to the $errors array. But, I have to use return; in some places to stop the script after an error occurs. So, when I do that, ...

How are files validated when opened?

Suppose a user selects a file in a dialogue box, and the app then opens the file for reading, etc. Users can open "incorrect" files--they can select a binary file, for example, even if the file they're supposed to be selecting is a text file. I recognize that sometimes improper file types generate exceptions, which can be handled. But ...

what you mean by Unable to resolve resource bundle "datamanagement" error occured in flex?

when will i add Advanced data grid in my project then it shows eror like everity and Description Path Resource Location Creation Time Id Unable to resolve resource bundle "datamanagement". but separte mxml file then add it not show any errors .my project i used locale binding for multi language so i add in complier -locale=English,Ja...

Turn off warnings and errors on php/mysql

I am getting expected notices and warnings, and would like to turn them off on my php file. errors are: Warning: fsockopen() and notices are: Notice: A non well formed numeric value encountered in I am planning to use cron for this php script, and do not want to get any errors or notices logged anywhere... ie cpanel error log etc... ...

Besides "treat warnings as errors" and fixing memory leaks, what other ideas should we implement as part of our coding standards?

First let me say, I am not a coder but I help manage a coding team. No one on the team has more than about 5 years experience, and most of them have only worked for this company.. So we are flying a bit blind, hence the question. We are trying to make our software more stable and are looking to implement some "best practices" and codin...

stack overflow error

i just got my first ever stack overflow when I ran this script: var hlat = 0.00; var hlong = 0.00; var mapdiv = document.getElementById('map'); var map_url = base_url + 'ajax/getPropMap'; var id_url = base_url + 'hotels/gethotel_id'; var id=0; var map = null; // apply gmaps to product map div $(function(){ $.get(id_url, {id: segmen...

fun error logging / reporting idea for small website

I want to write (or implement) a quick and easy logging solution for our website. I figure rss is fine for the format. I was thinking of piping apache's error log to a simple script that, if the url passes a blacklist, gets logged into a sqlite database. The database will store for each log entry the ip address, url, current count of th...

(ruby) Broken pipe (Errno::EPIPE)

i have a Broken pipe (Errno::EPIPE) error popping up and i don't understand what it is or how to fix it. the full error is: example.rb:19:in `write': Broken pipe (Errno::EPIPE) from example.rb:19:in `print' from example.rb:19 line 19 of my code is: vari.print("x=" + my_val + "&y=1&z=Add+Num\r\n") ...

Error handling inside or out of class?

Usually I do all what I can inside a class, in every method (try and catch). Am I doing it wrong? Recently I heard better way is handle error in program body... What is good habit? ...

Strange isolated jquery errors

After launching a major redesign for a client, we've received a handful of emails from users who are experiencing a script that is slowing down, and eventually crashing their browsers. The errors that they send to us always point back to jquery, but I know the jquery itself shouldn't be throwing any errors. I was originally using the mi...

How to find if there are javascipt errors in the page using selenium rc

I am using selenium rc and I would like to know if there are any javascript errors occured in the page. Is there any Selenium API to check if there are any javascript errors? Thanks very much. ...

How to trap a PHP script error which dies (Perl has eval)?

Hi I've got a script which works fine on our development server but dies on the clients server. error_reporting(E_ALL); if (function_exists('simplexml_load_file')) echo "function exists"; if (file_exists('test.xml')) { echo("<hr>just about to read local xml file :".__LINE__); $xml = simplexml_load_file('test.xml'); // dies here In ...

"Not Well-Formed" Errors in XML file after FTP

Using WS_FTP Professional, I have a backup process that runs every night. WS_FTP basically sets up the process to FTP to a remote server through windows scheduler. Specifically, It sends an XML file that is approximately 2.5 megs to a server for download. I check that the XML file is well-formed before the FTP and it always is. The p...

PHP simplexml_load_file - catch file errors

Hi, Is it possible to catch simplexml file errors? I'm connecting to a webservice that sometimes fails, and I need to make the system skip a file if it returns some http error or something similar. Thanks! ...

WPF WebBrowser Silent mode through IWebBrowser2 interface not working?

I'm trying to silence Javascript errors in the WPF webbrowser control. According to the "Getting to the native IWebBrowser2" comment on this page, one can access the IWebBrowser2 interface. From there I thought I could set the Silent property to true, like this: /// <summary> /// Handle navigation events /// </summary> p...

PHP produces a completly white page, no errors, logs, or headers.

While running some PHP code on my private WAMP PC I'm suddenly getting a blank response from the server - no response actually. No headers, no data, nothing in the PHP error logs, nada. I restarted APACHE and PHP but still nothing. I know php is working because I can access other PHP scripts just fine. Firebug reports no headers, ? byte...

PHP: Log errors to a logfile locally

Hello all, I am trying to setup PHP to log errors locally so that I can solve this problem. However, I can't even get this to work. I have followed this tutorial, but nothing. Does it only log fatal errors or what? Is there anything else I need to make sure of? ...

C++ “was not declared in this scope” compile error and modification tips.

I'm trying to modify this code in an attempt to make it work on an Arduino Mega. I'm pretty much new to C so, I may have made some major mistakes. By the way, this is for a self balancing skateboard. :P This code is taken from an ATmega32 (from : [url=http://sites.google.com/site/onewheeledselfbalancing/Home/twin-wheel-self-balancing-sk...

Python Cherrypy 404 Error Handling

I have a web server that has all of the configurations set in the code, but I want to be able to handle all page 404 errors. How would I go about doing this in Python? ...

Getting a list of errors in a Django form

I'm trying to create a form in Django. That works and all, but I want all the errors to be at the top of the form, not next to each field that has the error. I tried looping over form.errors, but it only showed the name of the field that had an error, not an error message such as "Name is required." This is pretty much what I'd like to ...