Search Results

Search found 63131 results on 2526 pages for 'error message'.

Page 32/2526 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Why do I get this error when trying to set up a class variable

    - by Jennifer
    I'm new to PHP so maybe I am overlooking something here but the following: class someClass { var $id = $_GET['id']; function sayHello() { echo "Hello"; } } gives the following error: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\files\classes.php on line 13 If instead of $_GET['id'] I set the variable $id to a string, everything is fine though.

    Read the article

  • How to handle error with content-disposition

    - by František Žiacik
    Hi, how should I handle an exception that occurs after sending a Content-Disposition header for an attachment? I'm trying to generate a report at server and send it as a file, but if an exception occurs during the report generation, the error message itself is sent to browser which still takes it as a content of a file and shows a Save As dialog. User cannot know there was an error generating report, saves the file which is in wrong format now. Is there a way to cancel the response with this header and redirect to an error page? Or what else can I do to inform user about the error? Probably I could generate the report first and only if there was no error send the headers, but I want the report render directly to the Response output stream so that it does not need to stay in memory. Here is my code: this.Response.ContentType = "application/octet-stream"; this.Response.AddHeader("Content-Disposition", @"attachment; filename=""" + item.Name + @""""); this.Response.Flush(); GenerateReportTo(this.Response.OutputStream); // Exception occurs Thanks for any suggestions

    Read the article

  • Frequent error in Oracle ORA-04068: existing state of packages has been discarded

    - by martilyo
    Hi, We're getting this error once a day on a script that runs every two hours, but at different times of the day. ERROR at line 1: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "PACKAGE.NAME" has been invalidated ORA-06508: PL/SQL: could not find program unit being called: "PACKAGE.NAME" ORA-06512: at line 1 Could someone list what conditions can cause this error so that we could investigate? Thanks. UPDATE: Would executing 'ALTER SESSION CLOSE DATABASE LINK DBLINK' invalidate a state of the package?

    Read the article

  • Overriding PEAR error handler

    - by Rolf
    Hi everyone, I'm currently working on an application that requires lots of external libraries. My job right now is set a unique error handler that will manage every error. So far, I found 7 different types of PEAR errors: PEAR_ERROR_RETURN: PEAR_ERROR_EXCEPTION: PEAR_ERROR_CALLBACK: PEAR_ERROR_EXCEPTION: PEAR_ERROR_PRINT: PEAR_ERROR_TRIGGER: PEAR_ERROR_DIE: I want to handle only the serious error (like the native E*_ERROR). The only problem is I have absolutely no idea about PEAR error criticity ! Those names are more related to the way of handling them than to their seriousness... Is there a real documentation about it ? I guess a better solution would consist in using their pushErrorHandling, but I just don't understand how to use it... If someone here knows, I'd be grateful... Thanks in advance !

    Read the article

  • Jquery error handling options

    - by yogsma
    I want to throw an error message if user doesn't input any value for a particular field. I am using blur event. I don't want to use ALERT function for throwing error messages. What are the other options we have available in jquery for error handling?

    Read the article

  • Emacs next-error (C-x `) visualization.

    - by coelhudo
    Hello, when I get a compiler error (in my case gcc) in Emacs (version 23 for information) I use next-error Lisp function to jump to the next error :) But when I do this the window is split vertically, but I want this to be done horizontally. Anyone know how to modify this behavior? Thanks

    Read the article

  • Ruby on Rails bizarre behavior with ActiveRecord error handling

    - by randombits
    Can anyone explain why this happens? mybox:$ ruby script/console Loading development environment (Rails 2.3.5) >> foo = Foo.new => #<Foo id: nil, customer_id: nil, created_at: nil, updated_at: nil> >> bar = Bar.new => #<Bar id: nil, bundle_id: nil, alias: nil, real: nil, active: true, list_type: 0, body_record_active: false, created_at: nil, updated_at: nil> >> bar.save => false >> bar.errors.each_full { |msg| puts msg } Real can't be blank Real You must supply a valid email => ["Real can't be blank", "Real You must supply a valid email"] So far that is perfect, that is what i want the error message to read. Now for more: >> foo.bars << bar => [#<Bar id: nil, bundle_id: nil, alias: nil, real: nil, active: true, list_type: 0, body_record_active: false, created_at: nil, updated_at: nil>] >> foo.save => false >> foo.errors.to_xml => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>\n <error>Bars is invalid</error>\n</errors>\n" That is what I can't figure out. Why am I getting Bars is invalid versus the error messages displayed above, ["Real can't be blank", "Real you must supply a valid email"] etc. My controller simply has a respond_to method with the following in it: format.xml { render :xml => @foo.errors, :status => :unprocessable_entity } How do I have this output the real error messages so the user has some insight into what they did wrong?

    Read the article

  • Build custom error messages in model files (example: using the 'pluralize' method)

    - by user502052
    I am using Ruby on Rails 3.0.7 and I would like to use the pluralize method in a my model file in order to properly build custom error messages. For example, I would like to do something like the following: NAME_MIN_LENGHT = 2 # Is 2 but I plan to change that (maybe dynamically... if it is possible) in future development validates :name, :length => { :minimum => NAME_MIN_LENGHT, :too_short => "is too short (minimum is #{pluralize(NAME_MIN_LENGHT, "character")})", }, How can I do that? Is it advisable? Why?

    Read the article

  • How do you throw an HTTP error with mod_python

    - by Zxaos
    I have a setup where I'm serving simple python pages using the mod_python publisher. At some points I'd like to have the python function raise a standard apache error - for example throwing a 500 error if a required file is missing. How can I throw an apache error from within a mod_python script?

    Read the article

  • Redirecting to frontpage after 404 error in PHP

    - by Saif Bechan
    I have a php web page that now uses custom error pages when a page is not found. The custom error pages are included in PHP. So when somebody types in an URL that does not exists I just include an error page, and the error page starts with: <?php header("HTTP/1.1 404 Not> Found"); ?> This also tells crawlers that the page does not exist. Now I have set up a new system. When a user types a wrong url, the user is sent back to the frontpage and a message is displayed on the frontpage. I redirect to the frontpage like this: header('Location:' . __TINY_URL . '/'); Now the problem is PHP just sends back a 200 code, page found. How can I mix these two to create a 404 code on the frontpage. And is this overall a nice way of presenting and error page.

    Read the article

  • LNK 1104 error to lib file - Continues despite removing includes and links

    - by user1556594
    A link error to a lib file popped up out of the blue in a c++ application of mine after code was working fine in my last session. Error 1 error LNK1104: cannot open file '..........\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\lib\fmodex_vc.lib' I triple checked my project directories were set up correctly to link to the lib file, that the file existed in said directory and that it was a working version of the .lib. My next step was to remove the includes to the file and the links to bypass the error and work on the rest of my code until the problem was solved. The error remains, however, despite: Commenting out absolutely every include relating to the lib. Commenting out absolutely every line of code dependant on the includes. Removing the directory from VC++ Directories in the project properties. Checking the Additional Library Directories field was also clear of references. To my understanding this should have made the library and related code virtually non-existant to the compiler. What am I missing? The library itself is fmodex_vc.lib - part of the FMOD API for providing sound to interactive applications. Again, the application was working one session, but failed to compile the next. I hadn't touched the code since so this led me to believe some aspect of VS is at fault. I'd like to avoid the time involded in re-installing if possible as I'm on the clock for a review tomorrow evening and there are a few more things I'd like to smooth out before then. If necessary, however, I won't hesitate. Very much appreciate the help.

    Read the article

  • Visual Studio 2005 Error

    - by xscape
    Im currently debugging a webservice written in visual studio 2005, however when i build it, it has an error but it did not specify anything Error 1 The specified module could not be found. (Exception from HRESULT: 0x8007007E) error message can be seen here Badly needed your help. Thank you

    Read the article

  • 400 error when submitting tumblr post (ruby on rails)

    - by Matenia Rossides
    I am having a bit of an issue with getting tumblr working within a rails app. This is the snippet of code which results in a 400 error (meaning that there was an incorrect parameter) @postcontent = @post.content.gsub(/<\/?[^>]*>/, "") post = Tumblr::Post.create(:email => 'valid@email', :password => 'mypassword', :type => 'video', :embed = @post.video_html, :caption = @postcontent) I have checked the API docs and checked my code and code content being rendered, and it still does not want to work. The funny thing is that it worked previously. It was working about a week ago. Has something changed with tumblr?

    Read the article

  • Using callback functions for error handling in C

    - by Earlz
    Hi, I have been thinking about the difficulty incurred with C error handling.. like who actually does if(printf("hello world")==-1){exit(1);} But you break common standards by not doing such verbose, and usually useless coding. Well what if you had a wrapper around the libc? like so you could do something like.. //main... error_catchall(my_errors); printf("hello world"); //this will automatically call my_errors on an error of printf ignore=1; //this makes it so the function will return like normal and we can check error values ourself if(fopen.... //we want to know if the file opened or not and handle it ourself. } int my_errors(){ if(ignore==0){ _exit(1); //exit if we aren't handling this error by flagging ignore } return 0; //this is called when there is an error anywhere in the libc } ... I am considering making such a wrapper as I am synthesizing my own BSD licensed libc(so I already have to touch the untouchable..), but I would like to know what people think about it.. would this actually work in real life and be more useful than returning -1?

    Read the article

  • powershell capture call stack after an error is thrown

    - by davidhayes
    Hi, I want to do something like this... try { # Something in this function throws an exception Backup-Server ... }catch { # Capture stack trace of where the error was thrown from Log-Error $error } Ideally I'd like to capture arguments to the function and line numbers etc. (like you see in get-pscallstack) Any ideas how to achieve this? Dave

    Read the article

  • Can Grails exceptionHandler support the following Error Handling Flow

    - by Andrew
    In my rails app that I am porting to grails whenever an unexpected error occurs I intercept the error automatically and display a form to the user informing them that an error has occured and asking them for further information. Meanwhile, as the form is rendered I write the stack trace and other information about who was logged in to a database table. Then if the form is submitted I add that information to the error report. I cannot tell from the exceptionHandler documentation and BootStrap examples whether that will allow me to grab all the information including various session and request parameters and then stuff them into a database and then post a form. Any thoughts?

    Read the article

  • Warning vs. error

    - by Samuel
    I had an annoying issue, getting a "Possible loss of precision" error when compiling my Java program on BlueJ (But from what i read this isn't connected to a specific IDE). I was surprised by the fact that the compiler told me there is a possible loss of precision and wouldnt let me compile/run the program. Why is this an error and not a warning saying you might loose precision here, if you don't want that change your code? The program runs just fine when i drop the float values, it wouldn't matter since there is no point (e.g [143.08, 475.015]) on my screen. On the other hand when i loop through an ArrayList and in this loop i have an if clause removing elements from the ArrayList it runs fine, just throws an error and doesn't display the ArrayList [used for drawing circles] for a fraction of a second. This appears to me as a severe error but doesn't cause (hardly) any troubles, while i wouldn't want to have such a thing in my code at all. What's the boundary?

    Read the article

  • Cannot redeclare config() error in cakePHP

    - by Sudhir
    Hi, I am getting the error Fatal error: Cannot redeclare config() (previously declared in.../basics.php:58, in live server. It works fine in my local server but when i uploaded the site to live server, i got the fatal error. I checked if the config() was declared multiple times but it's only declared once in basics.php file. The naming conventions are also followed, as it is working fine in local server. It only displays such error in live site. Please suggest solution for this. Help on this will be much appreciated.

    Read the article

  • javascript error: variable is not defined

    - by Hristo
    to is not defined [Break on this error] setTimeout('updateChat(from, to)', 1); I'm getting this error... I'm using Firebug to test and this comes up in the Console. The error corresponds to line 71 of chat.js and the whole function that wraps this line is: function updateChat(from, to) { $.ajax({ type: "POST", url: "process.php", data: { 'function': 'getFromDB', 'from': from, 'to': to }, dataType: "json", cache: false, success: function(data) { if (data.text != null) { for (var i = 0; i < data.text.length; i++) { $('#chat-box').append($("<p>"+ data.text[i] +"</p>")); } document.getElementById('chat-box').scrollTop = document.getElementById('chat-box').scrollHeight; } instanse = false; state = data.state; setTimeout('updateChat(from, to)', 1); // gives error }, }); } This links to process.php with function call getFromDB and the code for that is: case ('getFromDB'): // get the sender and receiver user IDs from their user names $from = mysql_real_escape_string($_POST['from']); $query = "SELECT `user_id` FROM `Users` WHERE `user_name` = '$from' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result); $fromID = $row['user_id']; $to = mysql_real_escape_string($_POST['to']); $query = "SELECT `user_id` FROM `Users` WHERE `user_name` = '$to' LIMIT 1"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result); $toID = $row['user_id']; $query = "SELECT * FROM `Messages` WHERE `from_id` = '$fromID' AND `to_id` = '$toID' LIMIT 1"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $text[] = $line = $row['message']; $log['text'] = $text; } break; So I'm confused with the line that is giving the error. setTimeout('updateChat(from,to)',1); aren't the parameters to updateChat the same parameters that came into the function? Or are they being pulled in from somewhere else and I have to define to and from else where? Any ideas how to fix this error? Thanks, Hristo

    Read the article

  • "Project description file" error in git?

    - by Paul Wicks
    I've a small project that I want to share with a few others on a machine that we all have access to. I created a bare copy of the local repo with git clone --bare --no-hardlinks path/to/.git/ repoToShare.git I then moved repoToShare.git to the server. I can check it out with the following: git clone ssh://user@address/opt/gitroot/repoToShare.git/ test I can then see everything in the local repo and make commits against that. When I try to push changes back to the remote server I get the following error. *** Project description file hasn't been set error: hooks/update exited with error code 1 error: hook declined to update refs/heads/master Any ideas?

    Read the article

  • SoapUI load test customised error

    - by Jothikumar
    Hello, Im trying to do load testing on a web server. I want to customise the error fields whenever i get results other than 200 ok. At present the error is realised only when the server doesnot respond. Is there anyway i could customise error as i need.

    Read the article

  • What is the meaning of this C++ Error std::length_error

    - by Janusz
    While running my program I get this Error: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Abort trap I know that you can't do much without the code but I think that error is to deep in the code to copy all of it. Maybe I can figure it out if I understand what this error means. Is this a sign for an issue with reading or writing at the wrong memory address? Is there something I can do to get more information about the problem from my program?

    Read the article

  • Suppress error with @ operator in PHP

    - by Mez
    In your opinion, is it ever valid to use the @ operator to suppress an error/warning in PHP whereas you may be handling the error? If so, in what circumstances would you use this? Code examples are welcome. Edit: Note to repliers. I'm not looking to turn error reporting off, but, for example, common practice is to use @fopen($file); and then check afterwards... but you can get rid of the @ by doing if (file_exists($file)) { fopen($file); } else { die('File not found'); } or similar. I guess the question is - is there anywhere that @ HAS to be used to supress an error, that CANNOT be handled in any other manner?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >