What's a good way to handle fatal errors - missing packages, .ui files not compiled, Qt DLLs or shared objects not found, etc. - in a PyQt app (or other Python app)?
Displaying a cross-platform message box without Qt DLLs or shared objects seems like a lot of work. Dumping a message to the console seems not very helpful, since the end ...
I'm creating a simple XML API in Rails, and currently, when there's an error, it renders the standard HTML error pages in public/, e.g. error in /tests.xml causes rendering of public/404.html.
Is there a way to make it render public/404.xml instead?
...
Below is my procedure in SQL Server 2005
PROCEDURE [dbo].[sp_ProjectBackup_Insert]
@prj_id bigint
AS
BEGIN
DECLARE @MSG varchar(200)
DECLARE @TranName varchar(200)
DECLARE @return_value int
-- 1. Starting the transaction
begin transaction @TranName
-- 2. Insert the records
SET IDENTITY_I...
I am using the Bottle framework. I have set the @error decorator so I am able to display my customized error page, and i can also send email if any 500 error occurs, but I need the complete traceback to be sent in the email. Does anyone know how to have the framework include that in the e-mail?
...
I have a pretty basic Servlet
public class DreambearLoginServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
JSONObject ret = new JSONObject();
try {
// handle the request
try {
...
I'm using a wrapper function around jQuery's AJAX function like this:
$.getAjax = function(url, type, callback){
$.ajax({
url: url,
cache: false,
dataType: type,
success: function(){
alert("success");
},
complete: function(XMLHttpRequest, textStatus){
alert("co...
For better or worse, Mathematica provides a wealth of constructs that allow you to do non-local transfers of control, including Return, Catch/Throw, Abort and Goto. However, these kinds of non-local transfers of control often conflict with writing robust programs that need to ensure that clean-up code (like closing streams) gets run. Man...
i'm trying to insert data into xml using php domdocument. however when i hit enter, it just displays a blank page showing no error. what am i doing wrong?
UPDATED:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$xmldoc = new DOMDocument();
if(file_exists('test.xml')){
$xmldoc->load('test.xml');
} els...
If been looking around the web and can't seem to find any good solutions to sending allowing your user to submit bug reports from your iPhone app.
How do you handle crashes and exceptions?
Do you send the error user-data to a server,
grab a log file from somewhere and attach,
or do you ignore it and pretend it never happened?
Anybod...
Hi,
In production, ActionMailer shows following errors, that are displayed in a log:
Errno::ECONNREFUSED (Connection refused - connect(2)):
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:551:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:551:i...
Is there a single place where I can track any uncaught exceptions in a asp.net mvc application?
I want to email the error, or write to a file/db.
...
Hello....I have a .Net 3.5 app that is throwing a null reference error in JavaScript that is generated by a third party control. I know how to debug through IE and Visual Studio. However, I need to trap this error (similar to try/catch) and present a user friendly message. What is the best way to accomplish this on the client-side?
...
Hi
I have a eval function like this
if(FALSE === @eval($code)) echo 'your code has php errors';
So if the code has synthax errors it will return that message.
The problem is that if within the code you have something like:
require_once('missing_file.php');
it will just break the page, without my nice error message :(
Is there ...
I have ASP.NET set up to use the CustomErrors functionality:
<customErrors mode="On" defaultRedirect="~/ErrorPages/500.aspx" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="~/ErrorPages/404.aspx" />
<error statusCode="500" redirect="~/ErrorPages/500.aspx" />
</customErrors>
Everything works nice, and the rele...
My site is completely custom, as such I like to know when I have poorly written code. I use set_exception_handler and set_error_handler to use custom classes to log errors to a file. This includes notices and warnings.
Within my own code, this is fine as I get very few logs and those that I do get are things I actually want to fix.
How...
When I run the following code, it slowly eats up my memory and even starts using swap:
long long length = 1024ull * 1024ull * 1024ull * 2ull; // 2 GB
db = [NSMutableData dataWithLength:length];
char *array = [db mutableBytes];
for(long long i = 0; i < length - 1; i++) {
array[i] = i % 256;
}
If I run it without the for c...
Currently we have many applications, where each application has its own error notification and reporting mechanism, so we clearly have many problems:
Lack of consistent error monitoring across different systems/applications: different GUIs, interfaces, different messages, etc.
Different approaches for error notification per application...
In previous large-scale applications requiring high robustness and long up-times, I've always been for validating a pointer function argument when it was documented as "must never be NULL". I'd then throw an std::invalid_argument exception, or similar, if the argument actually was NULL in C++ and return an error code in C.
However, I'm ...
I've been reading some Symfony documentation regarding validation/error-handling for controllers.
http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer
Validation and Error-Handling Methods (just over 2 thirds down)
I like the idea of a function automatically being called - validateMyAction before executeMyAction is c...
Is there a simple way to modify/customize error messages generated by Symfony validators?
eg. When using a string validator, if the field is empty,
then the message "Required" is displayed by default with the field.
This surely comes from its class, but is there a way to change the message for the String Validator globally so that it...