<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p># error outlets
<blockquote type="cite">Let's say.... if we were to consider
adding some sort of "standard outlet" for errors, how many
objects are we talking about? I assume not every object but
perhaps those which read/write files and the net objects? That's
not so many, really.</blockquote>
I agree. We should ask ourselves if it is really necessary to add
some generic error reporting mechanism to Pd. Error outlets are
certainly the most simple and most easy to understand solution
from a user perspective.<br>
</p>
<p># errno object
<blockquote type="cite">As Pd is more or less structured after C
to some degree, I like the idea of formalizing something like
errno and simply using the standard defined error numbers</blockquote>
When proposing the [errno] object, I did not mean that it would
output the C errno, but rather custom error codes as defined by
each object.</p>
<p># (sub)patch errors</p>
<p>Another disadvantage is that you need to have the object in a
dedicated subpatch, otherwise you have to use complicated [spigot]
logic to deal with crosstalk between several objects.</p>
<p>Christof<br>
</p>
<div class="moz-cite-prefix">On 15.06.2021 00:11, Dan Wilcox wrote:<br>
</div>
<blockquote type="cite"
cite="mid:46562C63-422E-47AD-A76C-17FD512C4302@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
line-break: after-white-space;" class="">
<div class="">(Resending to pd-list after respond to wrong
post.)</div>
<div class=""><br class="">
</div>
<div class="">Some quick thoughts on my end.</div>
<div class=""><br class="">
</div>
<div class=""># error outlets</div>
<div class=""><br class="">
</div>
<div class="">Let's say.... if we were to consider adding some
sort of "standard outlet" for errors, how many objects are we
talking about? I assume not every object but perhaps those
which read/write files and the net objects? That's not so
many, really. I already added a general "info" outlet for
[soundfiler] which could easily be extended by outputting an
error list ala "error # msg symbols..." or simply "errno."</div>
<div class=""><br class="">
</div>
<div class="">One negative is that this sort of approach becomes
relatively arbitrary and supported by only a few objects, some
which may have a dedicated error outlet and others which may
have a generalized outlet with some sort of error list
selector etc. OTOH the growth of Pd's objects over time has
ensured this kind of "arbitrariness" is part and parcel, so
maybe it is less so.</div>
<div class=""><br class="">
</div>
<div class="">A positive point is that it's relatively easy to
communicate and work with. For instance, we have this paradigm
to a small degree where [netrecieve] will output a 0 if the
connect message failed.</div>
<div class=""><br class="">
</div>
<div class=""># errno object</div>
<div class=""><br class="">
</div>
<div class="">As Pd is more or less structured after C to some
degree, I like the idea of formalizing something like errno
and simply using the standard defined error numbers. At least
there is something already to use, however the standard values
are probably not enough to cover all cases but at least "can't
open file" or "unsupported parameter" etc are there.</div>
<div class=""><br class="">
</div>
<div class="">This would force a certain design paradigm where
you need to do A then check error, then maybe do B and check
error, etc. Sure, that's how you do it in C, for most things,
but it's also a lot of boilerplate and boilerplate is much
more annoying in a patcher.</div>
<div class=""><br class="">
</div>
<div class=""># (sub)patch errors</div>
<div class=""><br class="">
</div>
<div class="">I find a sub(patch) level error object enticing,
ie. anything in this (sub)patch will throw an error to this
object. I think IOhannes called them exceptions, but I would
avoid that naming as I assume it will not halt or crash Pd if
the error is not handled.</div>
<div class=""><br class="">
</div>
<div class="">Like errno, this would force a certain design
paradigm where you need to group object + error object all the
time. In some cases it wouldn't bother me and in others I'd
find it annoying. It would be simple to communicate however
and relatively easy to integrate into Pd by, I assume, a new
API call where objects can raise a "patch level" error as
opposed to global stdout/stderr all console.</div>
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 14, 2021, at 11:25 PM, <a
href="mailto:pd-dev-request@lists.iem.at" class=""
moz-do-not-send="true">pd-dev-request@lists.iem.at</a>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta charset="UTF-8" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">Method calls which can
generate an error send the error code to a global<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">[errno] object and the
user can query the current error state with a<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">bang. This would be
similar to 'errno' in C.</span><br style="caret-color:
rgb(0, 0, 0); font-family: Menlo-Regular; font-size:
12px; font-style: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration:
none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">If the user queries the
errno immediately after the method call, Pd's<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">determinism guarantees
that the error really belongs to that method<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">call. We would have to
reserve a special value (e.g. "0") to mean "no<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">error".</span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<br style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">My main point is that
errors should not be *sent* by global or<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">canvas-local objects, but
that they should be *queried*. This way the<span
class="Apple-converted-space"> </span></span><br
style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px; text-decoration: none; float: none; display:
inline !important;" class="">user doesn't have to deal
with cross talk between different objects.</span></div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="">--------</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="">Dan Wilcox</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class=""><a
href="http://twitter.com/danomatika" class=""
moz-do-not-send="true">@danomatika</a></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class=""><a
href="http://danomatika.com/" class=""
moz-do-not-send="true">danomatika.com</a></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class=""><a
href="http://robotcowboy.com/" class=""
moz-do-not-send="true">robotcowboy.com</a></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class=""><br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</blockquote>
</body>
</html>