error-message

Zend fw, custom validation errors

Hello, I am creating a website with Zend_Form. In my controller, I assign a form object to the view. In the view, I use the following code to render the form: <?php if ( isset( $this->success ) ): ?> <div class="message success"><p>Thanks!</p></div> <?php elseif ( sizeof( $this->form->getMessages( ) ) > 0 ): ?> <div class="mess...

Hundreds of Notices and Warnings in PHP code

I've inherited some legacy code, within which if I turn on: error_reporting(E_ALL); I get literally hundreds of messages all over our site, all of them like: Warning: include_once() [function.include]: Failed opening '../inc/variables.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/xyz/xyz/xyz/payment.class...

Translate error codes to string to display

Is there a common way in C++ to translate an error code to a string to display it? I saw somewhere a err2msg function, with a big switch, but is that really the best way? ...

VB.NET Custom Errors Messages

...

Reference encoding error byte in Python

Suppose I type line = line.decode('gb18030;) and get the error UnicodeDecodeError: 'gb18030' codec can't decode bytes in position 142-143: illegal multibyte sequence Is there a nice way to automatically get the error bytes? That is, is there a way to get 142 & 143 or line[142:144] from a built-in command or module? Since I'm fairly co...

how do i throw exceptions with meaningful messages with a scala combination parser?

I'd like to throw an exception when the language doesn't conform to the grammar for a scala combination parser. Here's an example of a rule: def record: Parser[Record] = "-" ~ opt(recordLabel) ~ repsep(column, ",") ^^ { case "-" ~ label ~ columns => new Record(label, columns) } Let's say in the repsep(column, ",") part, they accid...

How can I customize rails3 validation error?

If I have a text input name 'email', and if I set :message => 'Your email is wrong kind' the validation error message will have something like 'Email Your email is wrong kind.' I am wondering if there is any way to remove that orginal input name (in above case, its Email) from the validation error output in rails3. ...

custom errorhandler does not handle critical errors (php)

Hi. This is the main part of my errorhandler: function my_error_handler($errno, $errstr, $errfile, $errline){ $errno = $errno & error_reporting(); if($errno == 0) return; if(!defined('E_STRICT')) define('E_STRICT', 2048); if(!defined('E_RECOVERABLE_ERROR')) define('E_RECOVERABLE_ERROR', 4096); $error = "...

cakephp Custom validation rule message

I have a custom validation rule to check if two passwords entered are the same, and if they arent I wish to have a message that says "Passwords do not match". The rule works, however, when the passwords don't match it simply displays the normal error message, what's going on? var $validate=array( 'passwd2' => array('rule' => 'a...

Send news feed with the new facebook.php class

Hi i'm new developer of fb apps and i want to know how can i send a message to the wall of my friends using the new facebook.php class http://github.com/facebook/php-sdk I do it this $result = $facebook->api('/me/feed/', 'post', array($ids,'message' => 'Playing around with FB Graph..') ); This code work for the firts time i c...

WebException: Unable to connect to the remote server

I have a client application that uses WebHttpRequest to get response from external server, it works fine but some times I'm getting the following exception .... System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did ...

LINQ-to-SQL The EntitySet is already loaded and the source cannot be changed.

I have an app which uses Linq2SQL to retrieve parent/child data. The parent data is stored in a binding source, Me.SampleDataBindingSource, and the child data in Me.MeasurementsBindingSource. When I create a new SampleData entity, the program works fine. But, when I try to retrieve an existing entity, I get the following error: Syst...

Errors with Michael Hartl's Rails Tutorial Chapter 7 - Specifically Rspec Testing Errors

I have not gotten any errors with the tests up to this point so far, but I can't figure out these errors. Failures: 1) PagesController GET 'home' should have the right title Failure/Error: response.should have_selector("title", undefined method `has_selector?' for #<ActionController::TestResponse:0x00000100ee9ed0> #...

Need help handling error message: Ivalue required as left operand of assignment

When I try to compile my code where ann is an annotation, coordinate is a 2d coordinate, and latit is a float ann.coordinate.latitude = latit; I get an error message saying Ivalue required as left operand of assignment. What does this error mean and why is it showing up? ...

Rails 3 - Error Validation on nested resource

I'm really struggling with how to handle Error Handling in Rails 3. I have hacked some ideas that could work but would rather do it the proper way. If anyone can help or give guidance I would appreciate it. Here is what I have so far ItemController def show @item = Item.find(params[:id]) @note = @item.notes.new respond_w...

Python 3.1 code and error

64-bit VISTA Python 3.1 from urllib import request a = request.urlopen('http://www.marketwatch.com/investing/currency/CUR_USDYEN').read(20500) b = a[19000:20500] idx_pricewrap = b.find('pricewrap') context = b[idx_pricewrap:idx_pricewrap+80] idx_bgLast = context.find('bgLast') rate = context[idx_bgLast+8:idx_bgLast+15] print(rate) Tr...

JQuery check if an option is selected and throw an error

URL: www.Wyler.com Problem: If you go to this site look at the inventory search bar right below the navigation menu. I need a script that throws an error if you try to click the "search" button if "new" and "select dealer" are selected. I tried to do this based on which options had a selected attribute but i'm not sure that attribut...

Error #2044: Unhandled StatusEvent:. level=error, code= -- No flash on page

I'm receiving this error, however there is NO flash on the page. I've used FireBug also to confirm, but only receive this error in IE (IE 8 that I've tested). Is there something else that could cause this outside of flash? ...

NSSpeechSynthesizer delegate method always reports an error, but which one?

I have the following delegate method for NSSpeechSynthesizer: - (void) speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL) success { NSLog(@"Finished correctly = %d", success); [startButton setEnabled:YES]; [stopButton setEnabled:NO]; } The parameter "success" is always NO, even though I heard everyth...

SQL Management Studio Insert statement confliction

I'm working on creating a development database for my boss. I have the SQL script that creates all the tables, but now I have loads of data to import. There are 5 tables total in the database, and their ID's are related to eachother like so: Note: I'm not allowed to share info like database/table names Table1 +-- Table2 +-- Table3 ...