FAQ Database Discussion Community


Visual Basic Max File Size Error

asp.net,.net,vb.net,file-upload,error-handling
Protected Sub AddFileButton_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Dim fileSize = FileUploader.PostedFile.ContentLength If FileUploader.HasFile Then Try Dim extension = System.IO.Path.GetExtension(FileUploader.FileName) Dim uniqueFileName = System.Guid.NewGuid.ToString() & extension FileUploader.SaveAs("\\path\" & FileUploader.FileName) Catch ex As Exception Info.Text = "ERROR: " & ex.Message.ToString() End Try Else If fileSize > 1048576 Then...

Why is AngularJS error message empty on error handling?

javascript,angularjs,error-handling,promise
I am using the AngularJS code to make a request to the server. On success it works fine, but when I redirect the request to some other domain provoking the CORS problem intentionally, error handling function is invoked but errorData is empty. In Chrome when i debug I can see...

On Error Goto doesn't work inside EventHandler subs

vba,error-handling
Lets assume this code: Module1: Sub main() Dim cl As New Class2 On Error GoTo errorhandler1 cl.DoWork On Error GoTo 0 Exit Sub errorhandler1: MsgBox (Err.Description) End Sub Class1: Event MyEvent() Public Sub DoWork() RaiseEvent MyEvent End Sub Class2: Private WithEvents cl As Class1 Private Sub cl_MyEvent() Call Err.Raise(123, ,...

improve the exception handling vb.net

vb.net,parsing,error-handling
Sooo... guys, I have a small trouble with the performance of the exception handling. I'm building... aaaaa... soooo...hmmm...a graph db? yeah something like this... with vb.net. I'm building the parser, for handling the basic functions of the db(?) What happen? The user makes a research, the program tab them, and...

Variable not resetting during loop creating misleading output

powershell,error-handling
I have a script here that reads a list of desktops and changes the administrator password of those DTs. It works but I have a minor problem. Once the error shows up in Powershell, the value is never reset. So for example the second DT failed and the third and...

Idiomatic Go for abstracting resource allocation/deallocation

error-handling,go,resources,idioms
Is there an idiomatic Go way for abstracting resource allocation/deallocation? My initial guess is to abstract the allocation/deallocation in a higher-order function: func withResource(f func(Resource)error) error { // allocate resource // defer free resource return f(resource) } However, this line of thinking is borrowed directly from the functional paradigm and...

VBA Excel simple Error Handling

excel,vba,excel-vba,error-handling
I have looked online as much as I could (except for the Microsoft support website, which is blocked at work for some reason). I am trying to simply skip an error. My code written here is simplified but should work the same way. What my code is supposed to do:...

How to determine data point that gives error?

r,error-handling,runtime-error
I have a code in R that reads, one line at the time, through a data.frame and if a certain set of conditions is met, changes the value of one of the variables in the data.frame. In pseudo code: for(i in 1:nrow(data)) { if (conditions on data[i,]) { change value...

Custom error page not showing on Laravel 5

php,laravel,error-handling
I am trying to display a custom error page instead of the default Laravel 5 message : "Whoops...looks like something went wrong" I made a lot of search before posting here, I tried this solution, which should work on Laravel 5 but had no luck with it : https://laracasts.com/discuss/channels/laravel/change-whoops-looks-like-something-went-wrong-page Here...

Can't capture duplicate port error in Express

node.js,express,error-handling
All, I have a simple Express web server on Windows Node. I can't work out how to capture the error if I'm trying to start the server on the same port as another instance of Express already running. The error middleware won't capture it and the usual .on("error", function ()....)...

PHP Warnings and Notices Showing with display_errors turned on but are not logging

php,apache,.htaccess,error-handling,error-logging
I am trying to log all the errors but for some reason I cannot get it to work! If I turn on display_errors in my .htaccess then errors pop up here and there. But instead of having them on display, I want them to be put in a log that...

Error handling in Python-MySQL

python,error-handling
I am running a little webservice based on python flask, where I want to execute a small MySQL Query. When I get a valid input for my SQL query, everything is working as expected and I get the right value back. However, if the value is not stored in the...

How do I tell VBA code to try again on a specific error?

vba,error-handling
I have some code which occasionally errors (if someone makes a change in the DB whilst I am trying to read as our locking is set to table level rather than row level and I can't change this). When it errors I hit debug and then hit continue and it...

Laravel 5 - How do I handle MethodNotAllowedHttpException

php,laravel,error-handling,exception-handling,laravel-5
Where do I catch MethodNotAllowedHttpException exception in Laravel 5. In laravel 4 i can do this in start/global.php

What is the difference between Swift 2.0 do-try-catch and regular Java/C#/C++ exceptions

swift,error-handling,runtime-error,swift2
It seems that Swift 2.0 has changed from traditional ObjC (NSError returning) and Swift 1.X (Success/Failure optionals) conventions of runtime error handling, to something that looks very similar to exception handling in languages like Java/C#/C++/etc. Apple has traditionally emphasized use of NSError instead of throwing NSException for runtime errors (vs...

What is the best way to terminate my program and have it output an error message of my choosing?

c++,error-handling
I want to do something like below, but the console closes too fast for me to read the error message and I can't break; completely out of a nested for loop. I just want the program to terminate and give me time to read the error message before it closes....

Django Rest Framework - how to create custom error messages for all ModelSerializer fields?

django,validation,error-handling,django-rest-framework,django-serializer
This is my serializers.py (I want to create a serializer for the built-in User model): from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username', 'password', 'email', ) I'm aware that Django Rest Framework has it's own field validators, because when I...

Can I export/require a module in Node.js to be used without a var holding its objects?

javascript,node.js,error-handling,custom-error-handling
I am creating my own error library to have a custom catalog of specific and well documented errors to return on my API. I am doing something like this: module.exports = CError; function CError () { } // CUSTOM ERROR TYPES CError.EmptyParamError = createErrorType(...); CError.InvalidFormatError = createErrorType(...); A sample of...

Ignore certain Gulp-less errors, or prevent it from attempting to call @imports with css keyword

fonts,error-handling,less,gulp
So I am using gulp as a task engine to handle less compilation (among other things), and part of our stylesheets include fonts from fonts.com. Here's the relevant task in our gulpfile: var gulp = require('gulp'), plugins = require('gulp-load-plugins')({ camelize: true }); browserSync = require('browser-sync'); reload = browserSync.reload; gulp.task('styles', function()...

handling return from function where no return type is expected in some case in java

java,function,error-handling,return-value
I had writtern a piece of code:In this code we are calling validitem function to check if passes param is some valid item or not.If it is valid item,i want to return that item else i want to abort processing stating its not valid item.Please suggest solution for the initial...

wpf c# DispatcherUnhandledException not firing

c#,wpf,error-handling,.net-4.0
I am in the process of creating a new WPF application and wanted to implement the DispatcherUnhandledException handler. My application is using a custom [STAThread] to handle the application startup rather than the App.XAML As you can see I register the handler in the Main() method: [STAThread] public static void...

Swift Errors Thrown from here are not handled

json,swift,error-handling,xcode7
I have had my code working in Xcode 6 but since I got Xcode 7 I cannot figure out how to fix this. The let jsonresult line has an error that says Error thrown from here are not handled. Code is below: func connectionDidFinishLoading(connection: NSURLConnection!) { let jsonresult:NSDictionary = try...

do try in beginSheetModalForWindow

swift,error-handling,swift2
In Swift 2.0, If I do the following: panel.beginSheetModalForWindow(self.view.window!) { (result) in switch result { // Save was selected case NSFileHandlingPanelOKButton: self.writeFile(fileString, fileURL: panel.URL!) // something else was selected default: break } } With a function as follows, it compiles and works. func writeFile(fileString: String, fileURL: NSURL) { do {...

Calling Errback with IdentifyTask (ArcGIS)

javascript,error-handling,arcgis
I'm trying to use the IdentifyTask for ArcGIS and I am aware that it is failing if the map service is incorrect. Now I want to handle the error. However, I'm not entirely sure of how I'm supposed to use the errback parameter to handle an error on the call....

My Ruby console closes before I can look at the error code [closed]

ruby,error-handling,console
So, when I run a Ruby script, if it has an error in it, it will run (in the ruby.exe console) until it hits the error, and then flash an error message for a quarter of a second or so and then close automatically. As you can see, this does...

Why does this code catch block not execute?

c++,multithreading,error-handling,try-catch
The catch handler is not run. But why? If the thread t is started before the try block, the catch handler runs. If the catch block's type does not match the type thrown, the program exits explaining that the thread terminated with an uncaught exception, suggesting that the exception is...

SAS detect and correct typo errors in data base

database,error-handling,sas,detect
I have a data base with 50 obs(employees) and multiple vars: questions q1,q2....,q10 => q1-q10 with satisfaction scale of 1-5 gender with scale of 1 and 0 status with scale of 1=married 0=single income weight education years and so on.. it is known that the data has typo errors.I need...

What HTTP Response code to return for urls containing " or %22?

html,error-handling,http-status-code-404,rfc,http-status-code-400
Per http://tools.ietf.org/html/rfc7230#section-3.1.1 recipients of an invalid request-line SHOULD respond with a 400 - Bad Request. Thus as per the RFC, the request, GET /cat".html HTTP/1.1 should return 400. I've written a server that will return just that upon detection of a ". Thus a request via telnet to my server...

How to see errors suppressed by '@'?

php,error-handling
I joined this crazy company as a Site Administrator. Now I did some changes to my db configurations which have impacted the PHP scripts execution. Strange part is PHP scripts just die. They don't throw any errors. When I went inside the scripts I realized they have used @ error...

Core Data - Swift - Catch “keypath not found in entity” error

ios,swift,core-data,error-handling
I am trying to catch an error when I execute a FetchRequest with a wrong/inexistent Key/Keypath but the app still crashes. This is how I created the NSPredicate: let pred = NSPredicate(format: "(\("WRONGKEY") = %@)", equalTo) let request = NSFetchRequest() request.predicate = pred request.entity = MyEntityDescription (WRONGKEY is a parameter...

else clause to repeat ajax triggers too many times

javascript,jquery,ajax,error-handling,cgi
I have an ajax function on my website which calls a cgi script. infrequently, this script returns a 500 error. I am trying to change the AJAX call so that when this happens, it will repeat the request. I have tried to do that as follows: function shelverx() { if...

Cakephp 3 - var not transmitted to view when exception thrown

error-handling,cakephp-3.0
In my AppController, I define a variable that must be used in every views (including error400.ctp, error500.ctp) of my app: // /src/Controller/AppController.php public function beforeFilter(Event $event) { parent::beforeFilter($event); $foo = 'bar'; $this->set(compact('foo')); } It works well, except when an exception is thrown (like NotFoundException): I get the following error: Undefined...

VB.net logic to catch errors in functions

vb.net,function,error-handling
I'm not a pro and I learn by myself a few of coding rules. I started with vba and now I'm approaching to vb.net but my knowledge is very poor. I wrote this function to extract a column from a recordset (query on DB) and put it into an Hashset...

why ajax error is different in IE and Chrome?

javascript,jquery,ajax,error-handling
Lets take example of the following code below. <script> function abc() { $.ajax({ type: "GET", url: "https://zx/abc/def", timeout: 6000, dataType: "jsonp", error: function(h, j, e) { console.log(h+" "+j+" "+e); } }) } </script> <button onclick="abc()">Start Call</button> The url used above is a non-existant/invalid one. Now lets see whats the output...

Handling Errors in PocketSphinx Android app

android,error-handling,cmusphinx,pocketsphinx,pocketsphinx-android
I am using the default dictionary that comes with the pocketsphinx demo which is good for my purposes. When a user enters a phrase, the app starts a keyphrase listening but if the word is not found in the dictionary the app crashes. The app crashes onError() within a service....

Collect RoutingError messages thrown

ruby-on-rails,ruby,ruby-on-rails-4,error-handling
I've just put a rails 4 app into production, and I've noticed what look like a number of scripted attacks, mostly on urls that end with .php. They look like this: I, [2015-05-11T22:03:01.715687 #18632] INFO -- : Started GET "/MyAdmin/scripts/setup.php" for 211.172.232.163 at 2015-05-11 22:03:01 +0100 F, [2015-05-11T22:03:01.719339 #18632] FATAL...

Powershell Error Validation

powershell,error-handling
Function Button_Click() { Param([Parameter(Mandatory=$True)] $telephone, $calledtoSee, $wantstoSeeyou, $pleaseCall, $willcallAgain, $returningYourCall, $ToSelection, $from, $telephoneNumber, $message) [boolean]$okayContinue=$true [string]$radioSelectedText [string]$comboBoxSectionText [string]$persontoEmail $callType $messageCount $comboBoxSectionText = $ToSelection.GetItemText($ToSelection.SelectedItem) if($okayContinue){ if($comboBoxSectionText -eq "Please Select Contact"){ [System.Windows.Forms.MessageBox]::Show("Please...

Application is missing a default group leaderboard (ItunesConnect error)

ios,error-handling,itunesconnect,missing-data,leaderboard
I am trying to update my game from 1.0 to 1.1 but get this error: "Application is missing a default group leaderboard (ItunesConnect error)" image: I also can't save anything, when I try to i Get this error: There was an error saving changes. Please try again later or contact...

sqlsrv_query doesn't return false on faulty T-SQL query

php,sql-server-2005,error-handling,sqlsrv
I'm using sqlsrv to connect to a MSSQL database. A feature in a secured (and only available to a few people) intranet application provides a box to write T-SQL code and execute them to the database. At this moment I'm working on a feature to test the given query. First...

Errors Handling in WCF - how to pass the error to client as well as remain the channel in the “Open” state

wcf,error-handling
I want to realize the schema, under which all the application-defined errors in my WCF service will be delivered to the clients, but the communication channel must remain in the "Open" state. At the current point the first task is realized by means of "IncludeExceptionDetailInFaults = true", but after the...

npm's guidelines on callback errors

javascript,asynchronous,error-handling,callback,npm
I was reading through npm’s coding style guidelines and came across the following very cryptic suggestion: Be very careful never to ever ever throw anything. It’s worse than useless. Just send the error message back as the first argument to the callback. What exactly do they mean and how does...

Kivy - OSError, Still Apps Run Successfully?

error-handling,kivy
Every time I run a Kivy app I see OSError (see it in last line of my given example). Even though my app runs successfully. What could be the cause of this error? Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File...

Log4Net error : “Failed to find configuration section log4net” AdoNetAppender

c#,database,error-handling,log4net,adonetappender
I made a new Projekt only for testing. I am trying to use LOG4Net to write into my DB. But I am still getting the Same Error. Below you can see my files and my data. I can not tell you the names of my DB and table but they...

django: raise an error similar to EmailField

django,forms,error-handling,emailfield
When using an email field, attempting to submit a form with an invalid email address raises and error like this: What I like about this: doesn't reload the page, rather doesn't submit at all and instead displays an error the look Here is what I am able to accomplish currently...

Facelets error page works during ajax request with FullAjaxExceptionHandler, but does not evaluate EL during synchronous request

jsf,error-handling,web.xml,omnifaces
I am trying to configure a normal (non-ajax) request error page using Omnifaces library. I am able to use the FullAjaxExceptionHandler and with ajax request error and its page as shown in the demo. When I use the same error page with normal request the error page is shown, but...

Error for customize page error 500

php,apache,.htaccess,error-handling
I dont know why i cant customize error 500 but its good for 404, 403 I have folder like that www index.php .htaccess (2) error index.php .htaccess (1) the first htaccess RewriteEngine on RewriteBase / # Error ErrorDocument 403 /error/index.php?error=403 ErrorDocument 404 /error/index.php?error=404 ErrorDocument 500 /error/index.php?error=500 And second RewriteEngine on...

RxJS error handling

javascript,error-handling,reactive-programming,rxjs
I've got an issue with RxJS swallowing errors. So in my case I've got something like this: function funcThatThrowsError(fn, ..args) { return fn.bind(fn, ...args); } function fetchItems() { Observable.fromPromise( reqwest({ url: `${API_ROOT}${url}`, method, data, contentType: "application/json" }) ).map(funcThatThrowsError(null, "someValue")) } const observableA = fechItems(); const observableB = ... ; Observable...

WPF- validation error event doesn't fire

c#,wpf,validation,events,error-handling
i think i have read already all related articles but non of them help.. im trying to enable/disable a save button of datagrid by the error state- but with no success. this is my code: contractor: AddHandler(Validation.ErrorEvent, new RoutedEventHandler(OnErrorEvent)); XAML: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"...

Front-end error displaying architecture in Laravel

php,laravel,error-handling,laravel-5
So I am doing the error handling in my Laravel 5 application, specially the front-end part, where the user will see that some error happened. I have the idea of having a simple error displaying page, that will receive errors and display in the browser for the user. (perhaps one...

jquery ajax Uncaught TypeError: Cannot use 'in' operator to search

jquery,ajax,json,error-handling
Hi I am using laravel jquery & ajax to return a JSON error as so: error: function (jqXhr, json, errorThrown) { var errors = JSON.stringify(jqXhr.responseJSON); var errorsHtml= ''; $.each( errors, function( key, value ) { errorsHtml += '<li>' + value[0] + '</li>'; }); toastr.error( errorsHtml , "Error " + jqXhr.status...

Codeigniter affected_rows always returning 0 when rows inserted

php,mysql,codeigniter,error-handling
Im doing an insert to a table and the script should only continue if the update inserts correctly. if($this->db->affected_rows() > 0){} Works perfectly fine else where in my application but for some reason at one point it doesnt and always returns 0 the snippet is as followed while($asked_order_amount_needed > 0){...

Handling EOF in user input

c,arrays,error-handling
I am writing a small program that allows a user to input the dimensions m and n of a matrix and then to fill that matrix as to her liking. To read in the numbers I use fgets() to read the user input as a string and then convert it...

Throwing general exception in Java

java,error-handling
This is for an online tutorial in throwing exceptions I am trying to do something like this: int power(int n, int p){ try { return (int)Math.pow(n,p); } catch(Exception e) { throw new Exception("n and p should be non-negative"); } } But I get the error error: unreported exception Exception; must...

TCL, get full error message in catch command

error-handling,tcl
#!/usr/bin/tclsh proc test {} { aaa } test When I run this script I get error message: invalid command name "aaa" while executing "aaa" (procedure "test" line 2) invoked from within "test" (file "./a.tcl" line 7) If I run test command in catch I get only first line of error...

error for displayed even it has not been submitted yet

php,error-handling,required
i just load the page yet the error has been displayed <?php $nameErr = $emailErr = $idErr = $passwordErr = ""; $name = $email = $id = $password = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["name"])) { $nameErr = "Name is required"; } else { $name = test_input($_POST["name"]); //...

Presenting public facing error page [closed]

php,error-handling
If a non-recovery error is discovered in set_error_handler(), set_exception_handler(), orregister_shutdown_function(), I log the error and present a public facing message apologizing for the error. For non-ajax requests, how should the message be presented? Redirect to a separate error message page? Make the request which caused the error return the error...

DjangoRestFramework ModelSerializer: field-level validation is not working

django,django-models,error-handling,django-rest-framework,django-serializer
This is my serializers.py (I want to create a serializer for the built-in User model): from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username', 'password', 'email', ) def validate_username(self, username): if not re.search(r'^\w+$', username): #checks if all the characters in username...

How to extend error handling code in Orchard?

asp.net-mvc,error-handling,orchardcms,raygun.io,raygun
I am trying to add error-tracking service Raygun to Orchard, however I am not sure how to intercept exception thrown by the application. In the default ASP.NET MVC it is usually done through Application_Error() in Global.asax.cs, is there a way to similarly do it in Orchard CMS? The only way...

PL/SQL error: PLS-00103: Encountered the symbol “EXCEPTION”

oracle,plsql,database-administration,error-handling
I'm making a PL/SQL error handling template. I'm getting this error: 'PLS-00103: Encountered the symbol "EXCEPTION"' and I can't figure out what's wrong. We're using an Oracle database. DECLARE err_num VARCHAR(100); -- We're not gonna do math on this so I made it a string. err_msg VARCHAR2(100); program VARCHAR2(100); statement...

Python - How to handle bad parameters when creating new instance?

python,validation,error-handling
What's the preferred way to handle bad parameters when creating a new instance of a class? For example, in a card game I might have a card class that can take Club, Heart, Diamond or Spade as the suit when creating a new instance (as well as the value). Do...

VBA How to exit function on error? Not working. Access 2007

vba,ms-access,error-handling,access-vba,ms-access-2007
In Access 2007 My Error Trapping is set on Break on Unhandled Errors I want the code to stop at the line where an error occurs and exit functions instead of resuming to the next line of code. However it doesn't seem to be working for me. I purposely created...

Is there any sdk to log exceptions, events and errors in production app?

android,logging,error-handling,sdk,production
I want to catch all the un expected/undesirable events in my app during production. I want something which can send a error log file to server and I can easily read it through a web application. Do you know anything of this sort ?

Ignoring User Exists Error in Oracle

oracle,error-handling,sqlplus,createuser
I have created a script that creates Oracle users and grants them roles. I am unable to find a way to ignore the "user exists" error: ORA-01920: user name '' conflicts with another user or role name. I understand that when the script is ran, it is possible that the...

QOpenGLShaderProgram: is possible to make error output nice?

qt,opengl,error-handling,shader,gpu
I'm implementing some numerical algorithms on GPU via OpenGL and Qt. But i am not very familiar with it. I want to extract some functions from my current shader to some "shader library" and use it in my other shaders by string interpolation. It not hard to implement but i...

How to deal with exceptions when using WebClient.DownloadFileAsync

c#,error-handling,webclient
I am downloading some files from the internet using a WebClient in the following way: try { ManualResetEvent mr = new ManualResetEvent(false); mr.Reset(); using (WebClient wc = new WebClient()) { wc.DownloadFileCompleted += ((sender, args) => { if (args.Error == null) { File.Move(filePath, Path.ChangeExtension(filePath, ".jpg")); mr.Set(); } else { //how to...

empty JTextField and adding number

java,swing,error-handling
I have three JTextfields called vol1HH1,vol1HH2,vol1HH3 and fvol. The result of which is output after an actionPerformed event. A user may just input a numbers into vol1HH1 and vol1HH2 but not vol1HH3, how would i ensure that the two numbers were added and the result displayed into fvol without causing...

How is echoing a var_dump valid?

php,error-handling
I have set E_ALL for error_reporting, today when i was reviewing my code, i saw something like: $test = ''; echo var_dump($test); while it doesn't cause any problem as far as i see, i was curious how is this valid? error_reporting didn't show anything. Will leaving it like that harm...

Idiomatic exception handling for socket connection

scala,sockets,error-handling,functional-programming,try-with-resources
I'm trying to understand how I can elegantly use scala.util.control.Exception package. To be more specific I want to convert this piece of Java code to functional way: public static boolean hostAvailabilityCheck() { try (Socket s = new Socket(SERVER_ADDRESS, TCP_SERVER_PORT)) { return true; } catch (IOException ex) { /* ignore */...

Confirming that the value of a UITextField value is a member of an enum

ios,swift,error-handling,enums
I have a UITextField With a UIPickerView to set its value from an enum and a save button the user presses to save their selection. My question is, is there a way to error trap this setup so when the user presses save it will confirm that the value of...

How can I remove the pesky “The runCommand action was canceled” dialog box after a “cancel = true” statement

vba,ms-access,error-handling,access-vba
On the Form_beforeupdate() event of my form "Alias" I have this... If IsNull(Me.txtFName) And IsNull(Me.txtLName) Then MsgBox "You must enter a contact!", vbokayonly, "Contact" Cancel = True End If Anytime this cancels a runCommand code such as... DoCmd.RunCommand acCmdSaveRecord a dialog appears telling me that it was canceled. Is there...

Can the mysql_error() function be disabled in php?

php,mysql,error-handling
I came across in a project of about 900 files with 3 millions lines of code, and my boss asked me to find a solution to prevent mysql_error() to show errors. This is the syntax mysql_query() OR die(mysql_error()) So, how can I disable the mysql_error() from showing errors?...

Grails customised message not working

grails,error-handling
Github source code https://github.com/grails-samples/grails-petclinic Customised message has been specified, unfortunately it doesn't work. owner.firstName.blank=You must specify a first name It shows error message "Property [firstName] of class [class org.grails.samples.Owner] cannot be null" instead of "You must specify a first name". I have found the same issue in this screencast http://grails.org/screencast/22...

Proper try of Cesium creation, error catching, cross browser compatibility and developer errors

javascript,mobile,error-handling,cross-browser,cesium
I am currently working on a GIS project hat has to be cross browser, mobile, multiplatform and omnipotent. Cesium does not work without WebGL, on some older browser and other minor exceptions, but i have to catch them all. I decided to swich to OpenLayers when Cesium can't be an...

How do i link domain from one.com to digitalOcean.com?

web,error-handling,dns,digital-ocean,domain-name
I have a domain name bought at one.com but cant seem to get the dns settup correctly. I followed this turorial from digital ocean (https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean) where I am instructed to use dns from one.com to my site. In this tutorial (http://www.one.com/en/support/guide/manage-your-dns-settings) they explain how to set up the dns, but...

Batch script terminates in case of error when using pipe operator

batch-file,error-handling,pipe
I need to perferm error handling (check ERRORLEVEL) on an operation involving the pipe operator, but instead of the script continuing with a non-zero ERRORLEVEL, it terminates immediately. How can I avoid this behavior? Consider the following example. (Note that is a simplified constructed example to illustrate the problem -...

Permission denied in find: why do we need 2>&1?

bash,error-handling,find,io-redirection
I was recently searching for a way to filter out 'Permission denied' errors while searching for a file using the find command, and I found this link: How can I exclude all "permission denied" messages from "find"? Here's an the answer that worked for me from the link: find ....

Acts As Votable Get Upvotes Error

ruby-on-rails,ruby,ruby-on-rails-4,error-handling,vote
Working with the Acts as Votable gem on my rails 4 app. So far I have gotten everything working, except when I call get_upvotes and get_downvotes to display how many votes a post has, I get this error: undefined method `get_upvotes' for #<Post:0x000001078b5f58> Here is my Post view (_post.html.erb): <%=...

Vba Ms-Word Nested Error Control

vba,error-handling,ms-word
I'm trying this time to handle errors between nested subs. For example: Sub A() On Error GoTo errormsg Call B Call C Exit Sub errormsg: MsgBox "Error in A", vbOKOnly, "Warning" End Sub Sub B() On Error GoTo errormsg Call D Exit Sub errormsg: MsgBox "Error in B",vbOKOnly,"Warning" End Sub...

json_decode is returning a null value instead of an array [on hold]

php,json,curl,error-handling
I am trying to search the keyword email in the decoded data. But it is not able to get the array type from json_decode. Here is the code $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_URL => $url, CURLOPT_USERAGENT => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML,...

Python internal error Handling

python,python-2.7,error-handling,clint
I'm having issues with my program just closing at random stages and am not sure why. At first, I thought it was because it was getting an error but I added an error handle. still for some reason it just closes after say a few days of running and no...

Exception handling in Erlang to Continue execution

exception,error-handling,exception-handling,erlang,ejabberd
What I am trying to do is mochijson2:decode(Ccode) generates any exception or error, program execution should not stop and case branch {error, Reason} should get executed. But when I am trying to get it implemented, it generates error at first line while checking and code doesn't continue execution for lines...

Customize blank errors in Devise

ruby-on-rails,error-handling,devise,customization
Now I get an error like this: Email can't be blank I can change just this part can't be blank errors: messages: blank: cannot be empty But it after this shows as: Email cannot be empty Can I change field name too? make it like E-mail_something_else cannot be empty? How...

Antlr : suppress console logs from antlr

java,error-handling,antlr
I want to catch the ANTLR errors in some way and suppress them showing up in my java logs. I am beginner in ANTLR and using ANTLR3.4 I went through this and I could not find any methods like these. lexer.removeErrorListeners(); lexer.addErrorListener(someListener()); parser.removeErrorListeners(); parser.addErrorListener(someListener()); Is there a way that I...

Error return from the MODISSummaries function (R package MODISTools)

r,matrix,error-handling
Does anyone know how to handle this error? It occurs both on my PC ("Windows" "7 x64" "build 7601, Service Pack 1" "x86-64") and Mac ("Darwin" "Darwin" "12.5.0" "Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64") library(MODISTools) data(SubsetExample) MODISSubsets(LoadDat = SubsetExample, Products = "MOD13Q1", Bands = c("250m_16_days_EVI",...

Why do I have to call app.UseErrorHandler before app.UseMvc in ASP 5 for it to work?

c#,asp.net,asp.net-web-api,error-handling,asp.net-5
I created an ASP.NET 5 application for Web API and installed Asp.Net.Diagnostics from NuGet so I could add my own error handling. What works: (From Configuration function in Startup.cs) app.UseErrorHandler("/Home/Error"); app.UseMvc(routes => { routes.MapRoute("Default", "{controller=Home}/{action=Index}/{id?}"); }); What doesn't work: (app uses normal error handler instead of the custom one) app.UseMvc(/*..configure...

How to fix run time error 424 when accessing the value of a CheckBox in Excel VBA?

excel-vba,error-handling,userform
Okay so here is the problem: In my user form, I have 2 checkboxes. I want to be able to use the value of the checkbox to perform a certain job. Example: Sub main() UserForm1.Show If UserForm1.CheckBox1.Value=True Then MsgBox("Awesome") End If End Sub Now my problem with this is that...

Why does realpath() return error EEXIST?

c++,error-handling,realpath
My program is running in a Linux environment, compiled with gcc version 4.4.7. I am using realpath() to "canonicalize" file paths. The path of every directory and file I feed to realpath() definitely exists, which of course is essential for realpath() to work properly. However, sometimes realpath() will fail with...

Shorten Error Message in Terminal

ruby-on-rails,ruby,error-handling,terminal
Rails error messages in terminal are too long and contain often useless information. Is there a gem/solution to shorten rails error messages? Example: 2.2.2 :012 > puts 1.red What I currently get: NoMethodError: undefined method `red' for 1:Fixnum from (irb):12 from [email protected]/gems/railties- 4.2.1/lib/rails/commands/console.rb:110:in `start' from [email protected]/gems/railties-4.2.1/lib/rails/commands/console.rb:9:in `start' from...

Restful API - JSON response with single or all error(s)

json,rest,error-handling
My current project, a restful API, validates a POST request to create a new user and multiple errors could occur (with HTTP status): username not set (400 BadRequest) username is taken (409 Conflict) server can't establish db connection (500 Internal Server Error) ... Should I immediatly send back a JSON...

Python Popen - wait vs communicate vs CalledProcessError

python,python-2.7,error-handling,popen
Continuing from my previous question I see that to get the error code of a process I spawned via Popen in python I have to call either wait() or communicate() (which can be used to access the Popen stdout and stderr attributes): app7z = '/path/to/7z.exe' command = [app7z, 'a', dstFile.temp,...

How to know the cause of failure? [closed]

java,android,performance,exception,error-handling
How can I find out if the app crashed in response to some user input or due to some internal error? And how can I determine the best way to handle those exceptions from the users point of view? ...

PHP - How can i make php to show webservers 404 error page on header 404?

php,html,error-handling,http-status-code-404
I am using PHP for scripting, and sometimes I need to throw a "404 Not Found" status message. I have tried this: <?php header($_SERVER['SERVER_PROTOCOL']." 404 Not Found"); header("Location: 404.html"); exit(); ?> But it's redirecting the user to the 404.html page and I don't think it's good practice to do so....

Why getting invalid literal when running this script?

python,dictionary,error-handling
When I run the following script, I get ValueError: invalid literal for int() with base 10: '2-' when the date only contains 1 digit (ie 02-02-2011). However it works fine when the date has 2 digits (ie 11-11-2011). What is the reason for this, and how can I fix it?...

F# HashCode to enum conversion

error-handling,enums,f#,hashcode,bitmask
I have an enum of bit-masked error codes with a string representation and an binary int representation: type ErrorCodes = | NoError = 0 | InvalidInputError = 1 | AuthenticationFailedError = 2 | InvalidArgumentError = 4 | ItemNotFoundError = 8 | UnknownError = 16 As I run through the program,...

python argparse — customizing error messages

python,error-handling,argparse
I want to generate custom error messages for particular usage errors in my command-line program that uses the argparse library. I know I can override the general presentation of the error by subclassing argparse.ArgumentParser: class HelpParser(argparse.ArgumentParser): def error(self, message): sys.stderr.write('error: %s\n' % message) sys.exit(2) parser = HelpParser(... ...) args =...

Handling errors in ANTLR4 JavaScript

javascript,error-handling,antlr4
I am using ANTLR4 JavaScript to create a sort of a web IDE for a custom language. It all works great, apart from the fact that errors are logged to the console and I can't figure out a way to redirect those errors somewhere I can present them to the...

PHP Pass Variables to register_shutdown_function - Fatal Error Handler

php,error-handling
I know this is not proper error handling, but it is necessary to solve my problem. I am running a script that parses data in a loop over many hours, so I create a logs of what is happening in the script at various moments to ensure everything is being...

Redirect if ActiveRecord::RecordNotUnique error exists

ruby-on-rails,postgresql,activerecord,error-handling
I have the next code to save: Transaction.create(:status => params[:st], :transaction_id => params[:tx], :purchased_at => Time.now).save! But how can I redirect to main root page if this ActiveRecord::RecordNotUnique error appears? Can I catch this error?...

Ajax / jQuery: How to communicate Ajax call error back to user

jquery,ajax,error-handling
I am new to Ajax and hope someone can help me with this. I use the below Ajax call in an onclick event in jQuery in order to pass data to a PHP file which inserts it into a MySQL db. In the PHP file I echo one of the...

python raising an error exception

python,exception,error-handling,exception-handling
I am working on an othello game for class and am trying to raise an exception when the player makes a valid move but this exception is making my program crash and im not sure why. I get the error: Traceback (most recent call last): File "C:\Users\chapp_000\Desktop\Othello\OthelloUI.py", line 46, in...