Laravel custom error message - error-handling

I am developing a web application using laravel5. I want to remove the default error message and put my custom error message.How do i do that?
Thanks in advance

You have to add appropriate error pages in errors view folder - like 503.blade.php, 500.blade.php and so on. And then add some logic in app/Exceptions/Handler.php file.

Related

can't save changes when deleting Routing App Coverage File

I'm trying to remove the Routing App Coverage .geojson file. Every-time I try to remove this and save changes, I get this error:
We’re temporarily unable to save your changes. Please try again
later.
It's been 2 days now. I still can't remove it. If I try to change any other field in the app submission form, it works. Just not the Routing file.
Here is what happened that led to this point:
I tried to submit an app with a valid .geojson file
I got an Invalid Binary error and the app was not submitted. This is because my app does not support routing.
I try to remove the Routing .geojson file from my submission form.
It doesn't work. I keep getting the error " We’re temporarily unable to save your changes. Please try again later. "
Error keeps occurring after 2 days.
I have no idea what is wrong. Please help. Thanks
I do not know if you have solved this, but I had the same problem. Just inspect the element (that pop-up that appears on top of the Routing App coverage), delete the element from browser's tree and press the delete button.

Ghost: Custom error message

Is there a way to have custom error message. For example, instead of having Page Not Found for 404, we can have Page Non Trouvé (in french!).
Is it possible? Directly from the error.hbs page?
Or maybe is it a french pack?
Thanks!
Yes you can provide your own error.hbs file with your template (see: http://support.ghost.org/ghost-themes-overview/#error.hbs). In your custom error page you can show the error message in french or customize it's appearance with handlebars.
Ghost is going to provide better language support in the future. For now it's still on the wishlist (see: http://ideas.ghost.org/forums/285309-wishlist/suggestions/7191893-localization).

Yii with Bootstrap error (CWebApplication.bootstrap not defined)

I have followed this setup, but not work for me http://www.cniska.net/yii-bootstrap/setup.html, all CSS files do not give style to the page,
So searching I found this thread How to install bootstrap extension in yii using some tricks. But not work's too.
Now I have this error
'Property "CWebApplication.bootstrap" is not defined.'
Anyone can help or have any idea?
Thanks in advance and for my English.
Property "CWebApplication.bootstrap" is not defined.
The error means the system is trying to access Yii::app()->bootstrap, which could be a property on the application. Since bootstrap is a component it should be accessible, if the configuration is done properly.
This error is most likely because you forgot the following in the main config file:
'components'=>array(
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
),
// This should point to the location you placed the files in for example extensions/bootstrap/components/bootstrap.php
The class location above will only work if the alias is set properly before setting the configuration.
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
Instead you could also change "bootstrap.components.Bootstrap" into "application.extensions.bootstrap.components.bootstrap".
I strongly advise you to use Yiistrap, it was made by the person who create yii boostrap and the person who created Yiibooster. Yiistrap has everything from both extensions and more new stuff. here is the page http://www.getyiistrap.com , also has a fully documented API which yii boostrap do not have and it will save a lot of google searches.

MVC3 Razor View Project using VB.NET gives Syntax error in Error List window for all vbhtml pages

Using MVC3 and Razor View engine, I created a VB.NET web application in VS 2010. This creates the default Account and Home Controller along with corresponding Action Views.
Now if I open any vbhtml file I get the following error message in the Error List window.
Error 50 Syntax error. C:****\MVC3AppVB\Views\Account\LogOn.vbhtml MVC3AppVB
(See screenshot here http://www.flickr.com/photos/7672540#N07/5469248676/)
Who ever this app compiles and runs without any problem. I tried to create the same project using C# and there is no error message in the Error List Window.
Can anyone explain why this error message shows up only for VB and not for C#?
Thanks in advance.
The problem is with MVC3 and webpage 1.0 tooling. This issue has been answered in codeplex.
Probably some bug with the Intellisense. Try recompiling the project. Unfortunately the Razor Intellisense is far from perfect. I hope it will be improved in future releases of Razor.

Customizing HTTPstatus code

I am using IIS6.0. Is there any way to customize the HTTPstatus code in HTTP header which we receive in response. My Requirement is to issue a 404- not found command in place of 403-Forbidden for a specific folder access(say images). So i need to customize Status code not custom error message.
thanks-
abhishek
Open the IIS Manager and goto the web app in question
Right-click on the folder whose 403 behavior you want to modify and select "properties"
Select the "Customer Errors" tab
Change the file/behavior specified the 403 behavior you want to modify
This change will apply to the folder in question as well as sub-folders, so if you don't want this setting to cascade then you'll need to undo what you just did for sub-folders.