octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: improving error messages?


From: Søren Hauberg
Subject: Re: improving error messages?
Date: Wed, 21 Oct 2009 12:48:56 +0200

ons, 21 10 2009 kl. 12:38 +0200, skrev Jaroslav Hajek:
> I ended up with the attached patch. This seems to mostly solve my problems:
> 
> octave:1> cellslices (1:3, 1, 4)
> error: cellslices: A(I): Index exceeds matrix dimension.
> octave:1> any(1, 1.5)
> error: any: conversion of 1.5 to int value failed
> error: any: expecting dimension argument to be an integer
> 
> I know this is no candidate for the best software design award, but it
> works and is a relatively harmless change...
> 
> Comments?

Funny! I was thinking about the same problem just a few days ago, and I
arrived at the same solution. One question, though:

Let's say I'm developing a function 'A' that calls a bunch of other
functions, i.e.

  function A ()
    ...
    B ();
    ...
  endfunction

what then happens if 'B' raises an error? Will I then get an error
message from 'A' instead? This could potentially make it harder to
develop functions or am I missing something?

Soren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]