[Swift-devel] [Swift-commit] r3835 - trunk/src/org/griphyn/vdl/karajan/functions (fwd)

Sarah Kenny skenny at uchicago.edu
Mon Jan 3 10:26:31 CST 2011


sure, you want to re-open the ticket?

On Mon, Jan 3, 2011 at 7:43 AM, Justin M Wozniak <wozniak at mcs.anl.gov>wrote:

>
> This looks right for end users, but for development it really helps to get
> a full stack trace.  Is it possible to turn on the full trace with a runtime
> option?
>        Justin
>
> --
> Justin M Wozniak
>
> ---------- Forwarded message ----------
> Date: Fri, 31 Dec 2010 17:39:13
> From: noreply at svn.ci.uchicago.edu
> To: swift-commit at ci.uchicago.edu
> Subject: [Swift-commit] r3835 - trunk/src/org/griphyn/vdl/karajan/functions
>
> Author: skenny
> Date: 2010-12-31 17:39:12 -0600 (Fri, 31 Dec 2010)
> New Revision: 3835
>
> Modified:
>   trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java
> Log:
> don't show java exceptions, only the swift error
>
> Modified:
> trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java
> ===================================================================
> --- trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java
>  2010-12-30 21:53:08 UTC (rev 3834)
> +++ trunk/src/org/griphyn/vdl/karajan/functions/ProcessBulkErrors.java
>  2010-12-31 23:39:12 UTC (rev 3835)
> @@ -90,31 +90,39 @@
>        }
>
>        public static String getMessageChain(Throwable e) {
> +           Throwable orig = e;
>                StringBuffer sb = new StringBuffer();
>                String prev = null;
> -        boolean first = true;
> +               String lastmsg = null;
> +               boolean first = true;
>                while (e != null) {
>                        String msg;
>                        if (e instanceof NullPointerException || e
> instanceof ClassCastException) {
>                            CharArrayWriter caw = new CharArrayWriter();
>                            e.printStackTrace(new PrintWriter(caw));
>                            msg = caw.toString();
> +
>                        }
>                        else {
>                            msg = e.getMessage();
> +                           if(msg != null){
> +                           lastmsg = msg;
> +                           }
> +
>                        }
>                        if (msg != null && (prev == null ||
> prev.indexOf(msg) == -1)) {
> -                if (!first) {
> -                    sb.append("\nCaused by:\n\t");
> -                }
> -                else {
> -                    first = false;
> -                }
> -                               sb.append(msg);
> -                prev = msg;
> +                           if (!first) {
> +                               sb.append("\nCaused by:\n\t");
> +                           }
> +                           else {
> +                               first = false;
> +                           }
> +                           sb.append(msg);
> +                           lastmsg = msg;
> +                           prev = msg;
>                        }
> -            e = e.getCause();
> +                       e = e.getCause();
>                }
> -               return sb.toString();
> +               return lastmsg;
>        }
>  }
>
> _______________________________________________
> Swift-commit mailing list
> Swift-commit at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-commit
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20110103/be66b4bb/attachment.html>


More information about the Swift-devel mailing list