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. 用 <a> 实现 <form> 表单的提交

    <form action="{:U('Index/fwbhss')}" method="post" id="tform" name=& ...

  2. [ActionScript 3.0] AS3 用于拖动对象时一次一页的缓动

    package com.fylibs.components.effects{ import com.tweener.transitions.Tweener; import flash.display. ...

  3. 使用commons-codec包加密字符串(MD5,SHA1,BASE64)

    1. [代码]MD5 String str = "abc"; DigestUtils.md5Hex(str); //附.net生成MD5的方法,生成内容跟java一致: Strin ...

  4. Webservice测试从头来

    一.写WebService 建立java project 建立数据类包 com.parameters.zz 新建Person类 package com.parameters.zz; public cl ...

  5. ownDocument和documentElement

    <!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...

  6. DatabaseError: no such table: django_session

    最近我也遇到这个问题了,从网上查了下,说是数据库同步出了问题,只需要运行如下命令:python manage.py syncdb就可以了 (这是django1.4之前的命令,1.4之后的是 pytho ...

  7. Redis数据持久化之AOF持久化

    一.RDB持久化的缺点创建RDB文件需要将服务器所有的数据库的数据都保存起来,这是一个非常耗费资源和时间的操作,所以服务器需要隔一段时间才能创建一个新的RDB文件,就也是说创建RDB文件的操作不能执行 ...

  8. 1314: ZZY的困惑

    1314: ZZY的困惑 Time Limit: 2 Sec  Memory Limit: 128 M[Submit][Status][Web Board] Description ZZY有很多爱好~ ...

  9. Appium小试

    最近有空玩了一下Appium,记录一下 1.下载Appium for windows,现在是0.12.3版本 https://bitbucket.org/appium/appium.app/downl ...

  10. unity区分点击在3D物体还是2D UI上

    当场景中的3D物体需要响应点击,但同时有UI显示时,存在判断点击是在3D物体上还是UI上的问题,办法如下: 1. 射线检测所有2D 3D物体,有2D物体被检测到时表明当前有UI.但无论Physics2 ...