A blunt, but useful method for debugging PeopleCode is to use the inbuilt "Error" function to stop processing and provide a message.

Something as simple as this can be a valuable debugging tool at times:

Error "The value of variable x=" | &x;

Most people use message box (or the now very deprecated WinMessage), but at times this may not appear depending on the context of the PeopleCode you are executing. Error stops processing (a poor man's breakpoint) so you can find out what's going on at that exact point in the code.

Note: Error causes a rollback of any pending database transactions, so if you need to store the state of the DB, put in a commit (e.g. SQLExec("commit") on Oracle) before throwing the error. 注意:错误会导致回滚所有待处理的数据库事务,所以如果你要在数据库中保存当前状态,请在抛出错误之前提交一个commit

Stop PeopleCode Processing with Error的更多相关文章

  1. svn的安装(整合apache、ldap)包括错误解决post commit FS processing had error

    2013年12月5日 admin 发表评论 阅读评论 以下是centos环境下,以yum安装apache及其相关软件.svn使用源码包编译,使用官网最新的1.8.5版本. 一.安装apache ope ...

  2. exception processing, template error resolving template

    错误信息:Exception processing template “/view/df”: Error resolving template “/view/df”, template might n ...

  3. Kafka自带zookeeper报错INFO Got user-level KeeperException when processing xxx Error Path:/brokers Error:KeeperErrorCode = NodeExists for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)

    问题描述: 按照kafka官方文档的操作步骤,解压kafka压缩包后.依次启动zookeeper,和kafka服务 kafka服务启动后,查看到zookeeper日志里有以下异常 问题原因及解决办法: ...

  4. Demystifying ASP.NET MVC 5 Error Pages and Error Logging

    出处:http://dusted.codes/demystifying-aspnet-mvc-5-error-pages-and-error-logging Error pages and error ...

  5. java画图程序_图片用字母画出来_源码发布_版本二

    在上一个版本:java画图程序_图片用字母画出来_源码发布 基础上,增加了图片同比例缩放,使得大像素图片可以很好地显示画在Notepad++中. 项目结构: 运行效果1: 原图:http://imag ...

  6. java画图程序_图片用字母画出来_源码发布

    在之前写了一篇blog:java画图程序_图片用字母画出来 主要是把一些调试的截图发布出来,现在程序调试我认为可以了(当然,你如果还想调试的话,也可以下载源码自己调试). 就把源码发布出来. 项目结构 ...

  7. 彩色照片转换为黑白照片(Color image converted to black and white picture)

    This blog will be talking about the color image converted to black and white picture. The project st ...

  8. ffmpeg+ffserver搭建流媒体服务器

    http://blog.chinaunix.net/uid-9688646-id-3399113.html ffmpeg和ffserver配合使用可以实现实时的流媒体服务.   一.理解 里边主要有如 ...

  9. svn的基本配置及安装

    1.检查是否已安装 rpm -qa subversion 如果要卸载旧版本: yum remove subversion 2.安装 yum install subversion 3.检查是否安装成功 ...

随机推荐

  1. Java中-XMX -xmn 是什么的缩写

    这个应该是 eclipse 的配置文件 eclipse.ini 中的配置语句.在配置文件中直接传递给 java vm 的参数并不多,调用形式是这样的: 1 eclipse [normal argume ...

  2. vs报算术运算溢出的错误

    是因为查询的数据量太大,把数据量减少点就不会报这个错了. 或者查询速度快点比如加索引也可能解决,待确定.

  3. c#创建、保存excel正常执行

    源地址:http://blog.csdn.net/hui_shixu/article/details/5785029

  4. Varnish 4.0 实战(转)

    简介 Varnish 是一款高性能且开源的反向代理服务器和 HTTP 加速器,其采用全新的软件体系机构,和现在的硬件体系紧密配合,与传统的 squid 相比,varnish 具有性能更高.速度更快.管 ...

  5. [ActionScript 3.0] AS3 绘制星形

    package { import flash.display.Sprite; import flash.events.Event; /** * @author Frost.Yen * @E-mail ...

  6. java生产随机字符串

    public static String getRandomString(int length) { //length表示生成字符串的长度 String base = "abcdefghij ...

  7. poj3253

    一道赫夫曼树的经典题目,一直以为这题的代码会很复杂,没想到书中竟描述地如此简单 #include <stdio.h> int n; long long p[20010]; //一道经典的赫 ...

  8. JDBC建立/关闭数据库连接

    JDBC(Java Data Base Connectivity,java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编写的类和接口 ...

  9. HDFS Java API 常用操作

    package com.luogankun.hadoop.hdfs.api; import java.io.BufferedInputStream; import java.io.File; impo ...

  10. HDU1325

    http://acm.split.hdu.edu.cn/showproblem.php?pid=1325 #include<stdio.h> #include<algorithm&g ...