exception,kohanaRelated issues-Collection of common programming errors
Loom
c++ exception-handling exception logging
I have some function like:void foo() { … }int main() {…try {…foo();…} catch (const std::exception &e) {std::cout << “Fatal error: e.what() << std::endl();return;}… }If an exception is thrown from foo, I’d like to know it. Also I want to know the reason of the original exception. I can split the code like this:int main() {… try {… } catch (const std::exception &e) {std::cout << “Fatal error: ” << e.what() << std::endl;return;}try {foo();} catch
HAL9000
mysql stored-procedures cursors exception
I’ve seen two different approaches of cursor handling is MySQL stored procedures. Now I’m curious about their stability, due to potential MYSQLEXCEPTION risks in stored routines.Assuming, that CURSOR is opened when DBMS raises MYSQLEXCEPTION and goes to EXIT HANDLER if it is declared…Approach #1:DELIMITER $$CREATE PROCEDURE `test1`() BEGIN DECLARE `EOS` BOOLEAN DEFAULT FALSE;DECLARE `buffer` INT UNSIGNED;DECLARE `MyCursor` CURSOR FOR SELECT`id` FROM`MyTable` LIMIT 50;DECLARE EXIT HANDLER FOR M
HLGEM
postgresql insert exception trigger
I am trying to write my first trigger. It is an insert trigger as follows:<b>Fatal error</b>: postgres7 error: [-1: ERROR: INSERT has more target columns than expressions at character 78INSERT INTO dash_pre_queue(ord_obj_guid,ord_entry_type_guid,client_obj_guid, installer_obj_guid, installer_serial_number, datetime, ord_proc_state_guid,created,ord_esc_type_guid,in_error,ord_entry_guid) SELECT(ord_obj_guid,NULL,client_obj_guid,inst_obj.inst_obj_guid,inst_obj.installer_serial_number
chintan khetiya
android database http exception
Help me please with error FATAL EXCEPTION mainI have this error when new activity starts.my code:package com.novator.inweld;import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader;import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONArray; import org.json.JSONObject;import android
user2619284
android multithreading exception android-asynctask
I load an image in Bitmap from the javaCameraView. This one is send to async task in order to send it to php file. During the first-second there is no problem. After this time, I have a problem of thread but I don’t find a solution. This is the LogCat : 07-25 16:36:29.492: E/AndroidRuntime(17507): FATAL EXCEPTION: AsyncTask #507-25 16:36:29.492: E/AndroidRuntime(17507): java.lang.RuntimeException: An error occured while executing doInBackground()07-25 16:36:29.492: E/AndroidRuntime(17507): a
user1880779
java android listview exception listactivity
I’m getting this error whenever I’m trying to start this activity :01-31 02:19:19.558: E/AndroidRuntime(1318): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.prva/com.example.prva.ListView}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is ‘android.R.id.list’ListActivity :package com.example.prva;import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.support.v4.widget.SimpleCurso
Susanna
android exception processing minim
I’m running Processing 2.02 in Windows 8, have jre 7 installed, running an emulator created for API level 11, using the latest Minim version (as of 9/20/2013). I wrote a test sketch to make sure I can run things to the emulator (a canvas 100×100 green with a simple line drawn). This works. I then wrote a sketch to test out Minim playing a mp3 sound snippet. The mp3 file is about 201K and is in the data folder The sketch works in java but fails when I switched to Android mode.Can someone please
William
java android exception
I am trying to ad admob ads to my app but I am getting this error in the logcat when it launches. The app ran fine before I added the admob so I think it’s something to do with that.03-16 19:08:00.683: E/AndroidRuntime(529): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.musicbynumbers.scalesads/com.musicbynumbers.scalesads.MainMenu}: java.lang.NullPointerException 03-16 19:08:00.683: E/AndroidRuntime(529): at android.app.ActivityThread.performLaunchActivity(ActivityThre
bilal.haider
android eclipse exception main
With my friends, we’re working in a project and for it i need to create an andoid application. (i specify, i’m a beginner at programming in java) So to start i’ve follow a good tutorial (http://www.buildcircuit.com/sensorgraph-using-android-amarino-and-arduino/) it explain how to create a connection enter your arduino (microcontroller) and your arduino with amarino (bluetooth).The program retrieves the value of the variable voltage and displays it on the phone.But i’ve trouble, my program doesn
user1880779
java android exception button onclicklistener
Application crashes and I’m getting this error :02-19 13:48:34.168: E/AndroidRuntime(1070): FATAL EXCEPTION: main 02-19 13:48:34.168: E/AndroidRuntime(1070): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.prva/com.example.prva.MainMenu}: java.lang.NullPointerException02-19 13:48:34.168: E/AndroidRuntime(1070): Caused by: java.lang.NullPointerException 02-19 13:48:34.168: E/AndroidRuntime(1070): at com.example.prva.MainMenu.onCreate(MainMenu.java:49)When I try
PeeHaa
kohana php
I got a fatal error at auto_load function. See the following error, indicating that the specific directory and file ‘/mnt/webDir/www/sossage/system/classes/kohna/log.php’ file failed opening required. Yes, file doesn’t exist. Its’s wrong path. But, I never write the code, also can’t find anywhere using ‘find’ option on my web root.Fatal error: Kohana_Core::auto_load(): Failed opening required ‘/mnt/webDir/www/mysite/system/classes/kohna/log.php’ (include_path=’.:/usr/share/php:/usr/share/pear’)
hakre
php kohana kohana-3
I’m using Kohana 3.2 with Controller_Template. Basically what I would like to do is to check the ACL of each action_method. If fail, load the access denied view and skip the rest of the action_method code; else continue loading. I know I could use an if…else statement to do a simple boolean check (or even do a if(check_permission())return;), but I hope there is a more elegant way of handling it with the least amount of extraneous code in the action_page()… if possible, just check_permission(
Laxus
php kohana
I’m giving a look at kohanaphp, and I was perplexed by the internal management of errors. When you initialize the framework, Kohana gives you the ability to disable the internal management of errors. When enabled, all errors (NOTICE, WARNING, etc..) are converted into using ErrorException exceptions. (http://php.net/manual/en/class.errorexception.php)Kohana makes large use this system to detect errors generated by php, in the form of exceptions. Example:try {$this->_connection = mysql_connect
alex
php session error-handling kohana kohana-3
I am using the Kohana 3 framework, and am using the native session driver.For some reason, occasionally the sessions fail to write to their file.Warning: session_start() [function.session-start]: open(/tmp/sess_*****, O_RDWR) failed: Permission denied (13) in /home/site/public_html/system/classes/kohana/session/native.php on line 27I am pretty sure Kohana has its own in built error handler, but it is not triggered with this error (i.e. it shows up like a normal PHP error, not the Kohana error).
diggersworld
php kohana uri kohana-3 route
Recently I’ve been doing some research into SEO and how URIs that use hyphens or underscores are treated differently, particularly by Google who view hyphens as separators.Anyway, eager to adapt my current project to meet this criteria I found that because Kohana uses function names to define pages I was receiving the unexpected ‘-‘ warning.I was wondering whether there was any way to enable the use of URIs in Kohana like:http://www.mysite.com/controller/function-nameObviously I could setup a ro
JGSilva
php kohana kohana-3.2
I’m testing Kohana AutoModeler, but I think it is an PHP lack of knowledge.I have just set it up and got this error ErrorException [ Parse Error ]: syntax error, unexpected ‘[‘ in /classes/context/user/add/factory.php.When I open the file, Dreamweaver did not recognize this line protected $_data = []; and this line public function __construct(array $data = []) probably because of [].In fact I did not find what is the meaning of $var = [] or how could a resolve this.Any help you’d be appreciated
matino
php kohana kohana-3
I have 1 controller to load and render the image.<?php defined(‘SYSPATH’) or die(‘No direct script access.’);class Controller_Image extends Controller {public function action_topo($id=NULL) {$fornecedor = ORM::factory(‘provider’)->where(‘nometag’, ‘=’, $this->request->param($id))->find();if ($fornecedor->loaded()) {$local = ‘media/fornecedor/’ . $fornecedor->nometag . ‘/’ . $fornecedor->sis_foto_baner; $image = Image::factory($local);$data = $image->render(N
JeremyFelix
php kohana
As detailed here: Need assistance with Kohana 3 and catch all route turning into a 404 error as the accepted answer to the question, I’m attempting to catch errors thrown by Kohana to display pretty error pages and send correct HTTP codes.Here’s a simplified version to demonstrate the problem:try {// Instantiate your Request object$request = Request::instance();// The give it a try, to see if its a valid request$request->execute(); } catch (Kohana_Request_Exception $e) {header(‘Content-Type:
Alexander Suhenko
kohana kohana-3 kohana-3.3
My kohana 3.3 site contains page, which I implemented like:$block_center = ‘here is html form’; $this->template->block_center = array($block_center);Of course, I used constructions like View::factory(‘ .. ‘)->bind … – doesn’t matters (result is the same).When running site on xampp v3.0.12, It works correctly. But when I run it on hosting (Apache/2.2.22 (Unix) PHP/5.3.8) – the fun starts: Four unexpected symbols appear on top of the page before html tag (for example: 5aeb) and after /h
kromol
php internationalization kohana
How can I change default locale that is defined in locale.php file in Kohana 2.3.4 in runtime?I use Kohana::config_set(‘locale.language’, array(‘en’, ‘United States’)); but after redirect it doesn’t work, it gets default value(from locale.php).Thanks
Web site is in building