Programming :: Libxml++ Enable Exception Handling

Oct 26, 2010

To parse several XML documents I'm using libxml++. I do programming for linux angstrom-armv5te. Because compiling libxml++ for this distribution and platform was impossible, I simply included the library to my project, which workes fine. Unfortunately I'm not able not use the exception handing which effects that a simple error inside a documents makes my whole program crash. This should not happen.

Is there a way to check the documents validity before parsing or better active the exception handling for doing this.

View 3 Replies


ADVERTISEMENT

Ubuntu Installation :: Error: Exception Handling Disabled - Use Fexceptions To Enable

Sep 27, 2010

I want to compile ekiga 3.0.2 for ubuntu 10.04. But when I enter 'make' command in the terminal windows, it says that;

[Code]...

I tried to solve the problem by setting CFLAGS = -fexceptions, in the Makefile. But it didn't work.

View 1 Replies View Related

Programming :: Exception Handling In Perl?

May 12, 2010

I writed Quote:

#!/usr/bin/perl -w
use Error qw(:try);
try {

[code]....

View 1 Replies View Related

Programming :: Parse A File Using Html Parser By Libxml - Undefined Reference

Jan 13, 2011

iḿ trying to parse a file using html parser by libxml.

Code: #include <stdio.h>
#include <libxml/HTMLparser.h>
#include <string.h>
void main(){
printf("main
");
[Code]....

View 4 Replies View Related

Programming :: C++: Getting And Handling Web Data?

Jan 29, 2010

I'm just starting out on a project relating to web search, to be done in C++. Which library should I use to help with downloading web pages into memory so that I can process them? The big thing is I want to be able to download the pages into variables/structures without actually putting them onto the hard disk.I googled and saw libcurl, but I was confused by some of the examples and wondering if this was really what I wanted.

View 2 Replies View Related

Programming :: How Error Handling Is Done In C

Jan 3, 2010

I wonder how error handling is done in C in real applications, by returning a error code when something goes wrong, or by using setjmp and longjmp, or something else?

View 10 Replies View Related

Programming :: Signal Handling In Pthread?

Mar 12, 2011

I have created a pthread, and installed a signal handler inside that, same way as we do in main( ) function. The thread's signal handler is a separate function. Surprisingly, it is not working, that is the thread's signal handler is not able to catch signals. Here is the code:

Code: #include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
typedef struct data

[Code]...

View 1 Replies View Related

Programming :: Try/except Error Handling In Bash?

Jun 30, 2011

I found, in bash, something similar to 'try/except' in python. I've been using something like this:

Code:
if ! 'command';then
echo 'damn, there was an error'

[code]....

View 4 Replies View Related

Programming :: Ways Of Handling The ADT Interface?

Nov 30, 2010

During my read, "Code Complete",the author described the different ways of handling the ADT interface.He has wrote this passage:

Quote:

Option 2: Explicitly provide the data used by the ADT services. In this approach, you declare the data that the ADT uses within each routine that uses an ADT service. In other words, you create a Font data type that you pass to each of the ADT service routines. You must design the ADT service routines so that they use the Font data that's passed to them each time they're called. The client code doesn't need a font ID if you use this approach because it keeps track of the font data itself. (Even though the data is available directly from the Font data type, you should access it only with the ADT service routines.This is called keeping the structure "closed.") The advantage of this approach is that the ADT service routines don't have to look up font information based on a font ID. The disadvantage is that it exposes font data to the rest of the program, which increases the likelihood that client code will make use of the
ADT's implementation details that should have remained hidden within the ADT.

The problem is that it is a bit subtle in terms of coding for me. Can anybody give more concrete example, in working codes, especially in Java?

View 2 Replies View Related

Programming :: Bash SMB Script Error Handling

Jun 1, 2011

I have a script that connects to a windows server, downloads a file, appends to it and then re-uploads the updated file. I want to implement error handling. An email is to be generated indicating whether there was an error or not. This email should include all standard and error output as a body. The current script looks something like this:

Code:
function Email_ServerSupport {
for time in once; do
echo "Subject: Billing - smb copy to accounting" $1
cat /tmp/smbx
cat /tmp/smbxerr
done | mail $EMAILADDR
}

/usr/bin/cp /dev/null /tmp/smbx
/usr/bin/cp /dev/null /tmp/smbxerr
cd /tmp
/usr/sfw/bin/smbclient $LOCATION -A $AUTHFILE >>/tmp/smbx <<EOF
get $OUTFILE
exit
EOF
cat $INFILE >> $OUTFILE
/usr/sfw/bin/smbxclient $LOCATION -A $AUTHFILE >>/tmp/smbx <<EOF
put $OUTFILE

cat /tmp/smbx | grep -v "Domain" | grep -v "putting file" | grep -v "getting file" >> /tmp/smbxerr
if [ -s /tmp/smbxerr ]; then
Email_ServerSupport " ERROR"
exit
else
echo "Transfer successful."
Email_ServerSupport " SUCCESS"
fi

The reason for the grep -v's is because, from my understanding, when using smbclient, ALL output goes to stdout, even errors. For this reason, I need to filter out lines including "domain" "putting file" or "getting file", all of which aren't errors. The problem is that even though the script seems to catch errors successfully now and then, the success email ends up blank (/tmp/smbx is somehow empty). I'm also worried it could miss possible errors I haven't tested. I'm thinking it has to do with the way "EOF" functions. Is there any way to capture output from the "put" and "get" commands? I can't simply redirect the output, can I?

View 1 Replies View Related

Programming :: `find . -exec' Handling Backticks In Bash

May 15, 2011

i had a problem with the find command in bash (which i deem is close enough to a promming language, if not please move this thread :P). i tried to reduce the command to the problem. i want the backticks, or $() for that matter; to be evaluated by -exec of find, not by bash. is that a caveat of find?

Code:

$ find testd -exec echo `basename {}` ; #confused me
test
test/a
test/b

[code]...

edit: i found out whats causing this. `basename {}` gets evaluated by bash before find is invoked, returns {} and `find . -exec echo {} ;" is run. now my question is, how to escape this eveluation from happening before.

View 11 Replies View Related

Programming :: Bash: Handling Input From File And Keyboard?

Jan 20, 2009

I have this little shell script which copies file names taken from inputfile:

Code:
while read line; do
cp -i $line something

[code]...

View 4 Replies View Related

Programming :: Perl Net- LDAP - Why Don't Work Any Error Handling

Nov 12, 2010

i have some perl codes for using ldap,but i don't know why don't work any error handling When i use msg->code for sample. an example:

[Code],,,,

In this case,if $msg->code return zero(or null) every thing work correctly but if it not zero don't give any message(eg."error result").What is problem?

View 1 Replies View Related

Programming :: Pthread_cancel Throw Exception But Not Always?

Apr 21, 2010

I am writing an application that uses POSIX thread. I am spawning a threads and threads performs task in infinite loop .I have another monitor which monitors the activities of these threads. Due to some reason I have to kill one thread from monitor thread. so I use pthread_cancel() . It terminates thread however it throws exception. I searched about the exception on internet and i am able to catch the exception and handle it as well . However the exception is not thrown every time . I wanted to know under what circumstances it throws exception. Accordingly I have to write cleanup handler

View 1 Replies View Related

Programming :: Bash Scripting Handling User Input Sections Automatically?

Jun 17, 2010

I have a system setup script for my Slackware installations that pulls all packages and source files from another machine and sets everything up to be identical between machines. The script works as expected but make it entirely unattended. How do I make the bash script deal with automatically selecting "Yes" for, for example "Install x(Yes/No): " when prompted by a make file?

View 3 Replies View Related

Programming :: Installing Tcl/tk For Use In C++ / Error Expected Type-specifier Before Exception?

Mar 14, 2011

I have perl/tk installed and working. I tried using c++/tk and had to change the #include path in the headers to find the tk.h and tcl.h. I tried compiling a simple c++ program with g++ to test that the headers are correct. the line i type at console is:

g++ test.c cpptk.cc cpptkbase.cc -o test.bin

I fixed all previous errors, except for the following.

code....

View 2 Replies View Related

Programming :: Program Hang Stuck There Signal Handling On POSIX Message Queue UNIX C Pr

Jun 14, 2011

In a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario:

View 1 Replies View Related

Programming :: Replacing The File In .Jar - Java.lang.NoClassDefFoundError Exception At Main Class

Jul 21, 2010

working on a script to update .Jar file, I have tried jar xf to unpack and jar cf to repack it is giving me java.lang.NoClassDefFoundError exception at main class. I also tried jar uf, which is also not working for me Basically my jar file requires to update date, which i do from "winrar" Manual it works fine, but now to remove "Donkey work", i want to make an script which does this all automatically, and the last stage is to update jar file which is not happening.

View 1 Replies View Related

Server :: PHP 5.3.3 Update - Missing Xml2 Or Libxml Install Dir?

Jul 10, 2011

I am trying to upgrade my PHP on the Linux server (CentOS) to above version 5.2.4 in order to support the latest Wordpress version - currently PHP 5.1.6 is on there. I have got as far as getting downloaded tar.gz files onto the server and located in the /usr/src/ directories - I have 5.3.3 & 5.3.6 on there - & already done the

Code:
# gunzip < php-5.3.3.tar.gz | tar xvf -
&
Code:
# gunzip < php-5.3.6.tar.gz | tar xvf -
but when I go to the folders
Code:
# cd /usr/src/php-5.3.3 and try to run the ./configure I get errors, below is what I suspect is causing the errors, but as you may have guessed I am no expert...

[Code]...

View 6 Replies View Related

Programming :: Handle A Broken Pipe Exception (SIGPIPE) In FIFO Pipe?

Mar 2, 2011

I've written a simple server in linux used fork to create a FIFO pipe.The server create two FIFO pipe.One for server read data from client and write data to client.Then another pipe for client read data from server and write data to server.When the server read data from a client used server-pipe and then write data to client.But ,if the client no read open the pipe,the server side write will be crashed because of a broken-pipe SIGPIPE. How to check whether the read side is opened?Or,how to catch the SIGPIPE,and then my server will still execute on,not crashed!!

View 5 Replies View Related

Software :: Ubuntu - Apt Libxml-sax-perl - Unable To Execute Installed Post-installation Script

Jul 16, 2010

I had a problem on ubuntu when running "sudo apt-get dist-upgrade" and wanted to report how I solved it. Hopefully this helps anybody with similar problems.

I always got the error message:

Code:

The problem is in libxml-sax-perl.postinst which does not seem to be executable.

I did not install any perl packages manually by cpan and found the solution in http://ubuntuforums.org/archive/inde...t-1342009.html where it was only one part of a bigger problem.

I created a backup file (always a good idea) of my libxml-sax-perl.postinst:

Code:

I deleted the old file:

Code:

Created a new file:

Code:

With the following content (copied from the link mentioned above):

Code:

View 1 Replies View Related

Ubuntu :: Deluge WebUI Enable / Re-enable Subsequently Unable To Re-enable It (doesn't Appear In The Side Panel Again)?

Feb 10, 2010

I recently installed Deluge 1.2.0 from the following PPA:[URL]I using this on two different Linux computers. One is running Linux Mint 8 and the other is running Ubuntu Netbook Remix 9.10. The first time on either computer when I enable WebUI in the Deluge GUI it works fine. However if I ever disable it in plugins section I am subsequently unable to re-enable it (doesn't appear in the side panel again). Rebooting or reinstalling Deluge seems to have no effect.Is this a bug or am I doing something wrong?

View 3 Replies View Related

Programming :: Enable RTS And DTR Pins In C Language?

Jun 6, 2011

How to enable RTS and DTR pins in c language? (I use termios.h include)

View 2 Replies View Related

OpenSUSE :: K3b Incapable Of Handling M4a?

May 13, 2010

just noticed when I went to burn a cd (just got a new car and at the moment the stereo does't have a auxiliary port and I'm not about to use a shotty fm transmitter) that k3b spikes the cpu through the roof an freezes when I write/burn/convert a m4a media file... I'm using k3b version 1.91.0.

View 3 Replies View Related

Programming :: Enable Graphics Features On Codeblock?

Jan 26, 2010

I'm used to write simple programs on codeblock which run on consle. i.e.console applications. When I try to compile programs which need graphic features, I get stuck as many libraries 9especially header files) are not in MINGW/include folder so I have to search on the net and add those files into include. My question is, by default, to enable graphics features on code block which "folder" should I download and incorporate it into codeblock? I tried to follow examples on glut, opengl, that is you have to download glut and add it somewhere on codeblock. Now I just want to have graphics functionality especially which need graphics.h file, searched on the net and find that sometime you have to download BGI, sometimes you have to download SDL, etc.

I hope you get the picture of what I'm trying to understand, it seems that by default codeblock doesn't come with graphic functionality e.g.graphics.h file, now what shall I download, and where do I add it so that I can draw graphs etc on codeblock. [codeblock has /include folder in C: Program FilesCodeBlocksMinGWinclude], now whenever I download new feature e.g. glut has its own version of include, lib folders etc. Is it necessary to add those include, lib on inlude, lib of C:Program FilesCodeBlocksMinGW? or it should work on its own original path? suppose I download glut on C:Program FilesCodeBlocksGlut. Now, what folder should I download to have graphics on codeblock?...

View 1 Replies View Related

General :: Commands For Logfile Handling?

Mar 28, 2011

I've got this log file and I need to get all sorts of information from it...

24 - [02/Sep/2010:00:01:16 +0200] - 10.1.53.62 - 200
23 - [02/Sep/2010:00:01:26 +0200] - 10.1.53.62 - 200
19 - [02/Sep/2010:00:01:56 +0200] - 10.1.53.62 - 200

[code]....

View 6 Replies View Related

Programming :: Checking To See If SSH Is Enable On A Cisco Router/Switch?

Apr 22, 2010

I'm trying to figure out a simple script to go thought 500 Cisco devices to see if I can SSH to the device. Then display something like this:

10.0.0.1 Yes
10.0.0.2 No
10.0.0.3 No

I tried something like this:

Code:

ssh -q -o BatchMode=yes -o StrictHostKeyChecking=no user@10.0.0.1 "echo 2>&1" && echo "Yes" || echo "No"

When tested the above line it replied No, even if I tried it on a Switch that does not have SSH configure.

View 8 Replies View Related

Programming :: Enable CTRL+C (to Terminate The Program) While Still Have RAW Mode?

Jun 2, 2010

changed terminal into raw modecfmakeraw(&termios);After that terminal no more captures CTRL+CIs there a way to enable CTRL+C (to terminate the program) while still have RAW mode?

View 3 Replies View Related

Debian :: Iptables - Netfilter Queue Handling

Jul 17, 2015

I have created a nfq handler via nfq_open() and using the returned qhandle to bind my application program to a specific queue number that is configured in iptables. when i invoke nfq_create_queue() my program is stuck there and the back trace shows it is blocked in recvfrom()

bt

in recvfrom () from /lib/x86_64-linux-gnu/libpthread.so.0
in nfnl_recv () from /usr/lib/libnfnetlink.so.0
in nfnl_catch () from /usr/lib/libnfnetlink.so.0

View 0 Replies View Related

General :: Memory Handling Capacity Of 64 Bit Ubuntu?

Aug 3, 2010

What is the maximum amount of ddr that can be installed in a 64 bit ubuntu linux system computer?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved