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. bat文件创建mysql数据库 数据库名为meter

    -- 详见附件,已自测通过      //修改为mysql安装路径     C:\Program Files\MySQL\MySQL Server 5.5"      createtestd ...

  2. java的新窗体

    1.JFrame窗体 jf.setSize(200, 150);        jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);  ...

  3. null 之AddAll、Add和Boolean

    @Test //failed public void TestListAddAll(){ List<TravelerInfo> travelerInfoSummary=new ArrayL ...

  4. framMaker、Velocity模版引擎

    1.一种模板文件,可以自动加载数据到模板里面展现. 类似:Velocity 2.使用场景 1.web开发模式 WEB-INF/view/vm 在互联网公司的开发都是基于vm的开发,其次就是使用JS的框 ...

  5. Arch xfce4 安装解压缩软件

    >>>安装方法 pacman -S thunar-archive-plugin xarchiver zip unzip p7zip arj lzop cpio unrar >& ...

  6. php dirname(__FILE__) 获取当前文件的绝对路径

    dirname(__FILE__) 取到的是当前文件的绝对路径,也就是说,比起相对路径,查找速度是最快的. 比如当前文件是放在(d:\www\)下,文件名是test.php.  测试的代码如下: &l ...

  7. jdk线程常见面试题

    请编写一个多线程程序,实现两个线程,其中一个线程完成对某个对象int成员变量的增加操作,即每次加1,另一个线程完成对该对象成员变量的减操作,即每次减1,同时要保证该变量的值不会小于0,不会大于1,该变 ...

  8. 怎样调整CODESOFT中条码线的宽度

       CODESOFT是一款功能强大.灵活便捷的标签条码设计打印软件.在使用CODESOFT设计并打印标签,有时会因为打印精度或扫面清晰度等原因,需要调整条形码中行的宽度,即调整条码线宽度.本文,小编 ...

  9. 使用eclipse上传项目到开源中国代码托管Git@osc教程

    创建项目 安装EGit插件 没有的话看下图 生成公钥 注册git账号 新建git项目 添加公钥 建立本地代码库 本文章版权归博主所有,如需转载请私信.

  10. canvas-7globleCompositeOperation2.html

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...